Package io.sentry
Class TransactionContext
java.lang.Object
io.sentry.SpanContext
io.sentry.TransactionContext
- All Implemented Interfaces:
JsonSerializable
,JsonUnknown
-
Nested Class Summary
Nested classes/interfaces inherited from class io.sentry.SpanContext
SpanContext.Deserializer, SpanContext.JsonKeys
-
Field Summary
FieldsFields inherited from class io.sentry.SpanContext
baggage, data, DEFAULT_ORIGIN, description, op, origin, status, tags, TYPE
-
Constructor Summary
ConstructorsConstructorDescriptionTransactionContext
(@NotNull SentryId traceId, @NotNull SpanId spanId, @Nullable SpanId parentSpanId, @Nullable TracesSamplingDecision parentSamplingDecision, @Nullable Baggage baggage) TransactionContext
(@NotNull String name, @NotNull TransactionNameSource transactionNameSource, @NotNull String operation) TransactionContext
(@NotNull String name, @NotNull TransactionNameSource transactionNameSource, @NotNull String operation, @Nullable TracesSamplingDecision samplingDecision) CreatesTransactionContext
with explicit sampling decision and name source.TransactionContext
(@NotNull String name, @NotNull String operation) TransactionContext
(@NotNull String name, @NotNull String operation, @Nullable TracesSamplingDecision samplingDecision) CreatesTransactionContext
with explicit sampling decision. -
Method Summary
Modifier and TypeMethodDescriptionstatic TransactionContext
fromPropagationContext
(@NotNull PropagationContext propagationContext) @NotNull String
getName()
@Nullable Boolean
@Nullable TracesSamplingDecision
@NotNull TransactionNameSource
boolean
Whether thisTransactionContext
evaluates for the next app start.void
setForNextAppStart
(boolean forNextAppStart) void
void
setParentSampled
(@Nullable Boolean parentSampled) void
setParentSampled
(@Nullable Boolean parentSampled, @Nullable Boolean parentProfileSampled) void
setTransactionNameSource
(@NotNull TransactionNameSource transactionNameSource) Methods inherited from class io.sentry.SpanContext
copyForChild, equals, getBaggage, getData, getDescription, getInstrumenter, getOperation, getOrigin, getParentSpanId, getProfileSampled, getSampled, getSamplingDecision, getSpanId, getStatus, getTags, getTraceId, getUnknown, hashCode, serialize, setData, setDescription, setInstrumenter, setOperation, setOrigin, setSampled, setSampled, setSamplingDecision, setStatus, setTag, setUnknown
-
Field Details
-
DEFAULT_TRANSACTION_NAME
- See Also:
-
-
Constructor Details
-
TransactionContext
-
TransactionContext
@Internal public TransactionContext(@NotNull @NotNull String name, @NotNull @NotNull TransactionNameSource transactionNameSource, @NotNull @NotNull String operation) -
TransactionContext
public TransactionContext(@NotNull @NotNull String name, @NotNull @NotNull String operation, @Nullable @Nullable TracesSamplingDecision samplingDecision) CreatesTransactionContext
with explicit sampling decision.- Parameters:
name
- - transaction nameoperation
- - operationsamplingDecision
- - sampling decision
-
TransactionContext
@Internal public TransactionContext(@NotNull @NotNull String name, @NotNull @NotNull TransactionNameSource transactionNameSource, @NotNull @NotNull String operation, @Nullable @Nullable TracesSamplingDecision samplingDecision) CreatesTransactionContext
with explicit sampling decision and name source.- Parameters:
name
- - transaction nameoperation
- - operationsamplingDecision
- - sampling decision
-
TransactionContext
@Internal public TransactionContext(@NotNull @NotNull SentryId traceId, @NotNull @NotNull SpanId spanId, @Nullable @Nullable SpanId parentSpanId, @Nullable @Nullable TracesSamplingDecision parentSamplingDecision, @Nullable @Nullable Baggage baggage)
-
-
Method Details
-
fromPropagationContext
@Internal public static TransactionContext fromPropagationContext(@NotNull @NotNull PropagationContext propagationContext) -
getName
-
getParentSampled
-
getParentSamplingDecision
-
setParentSampled
-
setParentSampled
-
getTransactionNameSource
-
setName
-
setTransactionNameSource
-
setForNextAppStart
@Internal public void setForNextAppStart(boolean forNextAppStart) -
isForNextAppStart
public boolean isForNextAppStart()Whether thisTransactionContext
evaluates for the next app start. If this is true, it gets called only once when the SDK initializes. This is set only ifSentryOptions.isEnableAppStartProfiling()
is true.- Returns:
- True if this
TransactionContext
will be used for the next app start.
-