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 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, @NotNull SentryId traceId, @NotNull SpanId spanId, @NotNull TransactionNameSource transactionNameSource, @Nullable SpanId parentSpanId, @Nullable TracesSamplingDecision parentSamplingDecision, @Nullable Baggage baggage) TransactionContext
(@NotNull String name, @NotNull String operation, @Nullable TracesSamplingDecision samplingDecision) CreatesTransactionContext
with explicit sampling decision. -
Method Summary
Modifier and TypeMethodDescriptionstatic @NotNull TransactionContext
fromSentryTrace
(@NotNull String name, @NotNull TransactionNameSource transactionNameSource, @NotNull String operation, @NotNull SentryTraceHeader sentryTrace) CreatesTransactionContext
from sentry-trace header.static @NotNull TransactionContext
fromSentryTrace
(@NotNull String name, @NotNull TransactionNameSource transactionNameSource, @NotNull String operation, @NotNull SentryTraceHeader sentryTrace, @Nullable Baggage baggage, @Nullable SpanId spanId) CreatesTransactionContext
from sentry-trace header.static @NotNull TransactionContext
fromSentryTrace
(@NotNull String name, @NotNull String operation, @NotNull SentryTraceHeader sentryTrace) CreatesTransactionContext
from sentry-trace header.@Nullable Baggage
@NotNull Instrumenter
@NotNull String
getName()
@Nullable Boolean
@Nullable TracesSamplingDecision
@NotNull TransactionNameSource
void
setInstrumenter
(@NotNull Instrumenter instrumenter) void
setParentSampled
(@Nullable Boolean parentSampled) void
setParentSampled
(@Nullable Boolean parentSampled, @Nullable Boolean parentProfileSampled) Methods inherited from class io.sentry.SpanContext
getDescription, getOperation, getParentSpanId, getProfileSampled, getSampled, getSamplingDecision, getSpanId, getStatus, getTags, getTraceId, getUnknown, 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 String name, @NotNull @NotNull String operation, @NotNull @NotNull SentryId traceId, @NotNull @NotNull SpanId spanId, @NotNull @NotNull TransactionNameSource transactionNameSource, @Nullable @Nullable SpanId parentSpanId, @Nullable @Nullable TracesSamplingDecision parentSamplingDecision, @Nullable @Nullable Baggage baggage)
-
-
Method Details
-
fromSentryTrace
@NotNull public static @NotNull TransactionContext fromSentryTrace(@NotNull @NotNull String name, @NotNull @NotNull String operation, @NotNull @NotNull SentryTraceHeader sentryTrace) CreatesTransactionContext
from sentry-trace header.- Parameters:
name
- - the transaction nameoperation
- - the operationsentryTrace
- - the sentry-trace header- Returns:
- the transaction contexts
-
fromSentryTrace
@Internal @NotNull public static @NotNull TransactionContext fromSentryTrace(@NotNull @NotNull String name, @NotNull @NotNull TransactionNameSource transactionNameSource, @NotNull @NotNull String operation, @NotNull @NotNull SentryTraceHeader sentryTrace) CreatesTransactionContext
from sentry-trace header.- Parameters:
name
- - the transaction nametransactionNameSource
- - source of the transaction nameoperation
- - the operationsentryTrace
- - the sentry-trace header- Returns:
- the transaction contexts
-
fromSentryTrace
@Internal @NotNull public static @NotNull TransactionContext fromSentryTrace(@NotNull @NotNull String name, @NotNull @NotNull TransactionNameSource transactionNameSource, @NotNull @NotNull String operation, @NotNull @NotNull SentryTraceHeader sentryTrace, @Nullable @Nullable Baggage baggage, @Nullable @Nullable SpanId spanId) CreatesTransactionContext
from sentry-trace header.- Parameters:
name
- - the transaction nametransactionNameSource
- - source of the transaction nameoperation
- - the operationsentryTrace
- - the sentry-trace headerbaggage
- - the baggage header- Returns:
- the transaction contexts
-
getName
-
getParentSampled
-
getParentSamplingDecision
-
getBaggage
-
setParentSampled
-
setParentSampled
-
getTransactionNameSource
-
getInstrumenter
-
setInstrumenter
-