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, 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) static @NotNull TransactionContext
fromSentryTrace
(@NotNull String name, @NotNull String operation, @NotNull SentryTraceHeader sentryTrace) Deprecated.@Nullable Baggage
@NotNull Instrumenter
@NotNull String
getName()
@Nullable Boolean
@Nullable TracesSamplingDecision
@NotNull TransactionNameSource
void
setInstrumenter
(@NotNull Instrumenter instrumenter) 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
equals, getDescription, getOperation, getParentSpanId, getProfileSampled, getSampled, getSamplingDecision, getSpanId, getStatus, getTags, getTraceId, getUnknown, hashCode, serialize, setDescription, setOperation, 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) 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
-
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.CreatesTransactionContext
from 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.