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
Fields inherited from class io.sentry.SpanContext
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) CreatesTransactionContextwith explicit sampling decision and name source.TransactionContext(@NotNull String name, @NotNull String operation) TransactionContext(@NotNull String name, @NotNull String operation, @Nullable TracesSamplingDecision samplingDecision) CreatesTransactionContextwith explicit sampling decision. -
Method Summary
Modifier and TypeMethodDescriptionstatic TransactionContextfromPropagationContext(@NotNull PropagationContext propagationContext) static @NotNull TransactionContextfromSentryTrace(@NotNull String name, @NotNull String operation, @NotNull SentryTraceHeader sentryTrace) Deprecated.@Nullable Baggage@NotNull Instrumenter@NotNull StringgetName()@Nullable Boolean@Nullable TracesSamplingDecision@NotNull TransactionNameSourcevoidsetInstrumenter(@NotNull Instrumenter instrumenter) voidvoidsetParentSampled(@Nullable Boolean parentSampled) voidsetParentSampled(@Nullable Boolean parentSampled, @Nullable Boolean parentProfileSampled) voidsetTransactionNameSource(@NotNull TransactionNameSource transactionNameSource) Methods inherited from class io.sentry.SpanContext
equals, getDescription, getOperation, getOrigin, getParentSpanId, getProfileSampled, getSampled, getSamplingDecision, getSpanId, getStatus, getTags, getTraceId, getUnknown, hashCode, serialize, setDescription, setOperation, setOrigin, setSampled, setSampled, setSamplingDecision, setStatus, setTag, setUnknown
-
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) CreatesTransactionContextwith 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) CreatesTransactionContextwith 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
-
fromSentryTrace
@Deprecated @NotNull public static @NotNull TransactionContext fromSentryTrace(@NotNull @NotNull String name, @NotNull @NotNull String operation, @NotNull @NotNull SentryTraceHeader sentryTrace) Deprecated.useSentry.continueTrace(String, List)and setters for name and operation here instead.CreatesTransactionContextfrom sentry-trace header.- Parameters:
name- - the transaction nameoperation- - the operationsentryTrace- - the sentry-trace header- Returns:
- the transaction contexts
-
fromPropagationContext
@Internal public static TransactionContext fromPropagationContext(@NotNull @NotNull PropagationContext propagationContext) -
getName
-
getParentSampled
-
getParentSamplingDecision
-
getBaggage
-
setParentSampled
-
setParentSampled
-
getTransactionNameSource
-
getInstrumenter
-
setInstrumenter
-
setName
-
setTransactionNameSource
-
Sentry.continueTrace(String, List)and setters for name and operation here instead.