Package io.sentry
Class TransactionContext
- java.lang.Object
-
- io.sentry.SpanContext
-
- io.sentry.TransactionContext
-
- All Implemented Interfaces:
JsonSerializable
,JsonUnknown
public final class TransactionContext extends SpanContext
-
-
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
Constructors Constructor Description TransactionContext(@NotNull java.lang.String name, @NotNull TransactionNameSource transactionNameSource, @NotNull java.lang.String operation)
TransactionContext(@NotNull java.lang.String name, @NotNull TransactionNameSource transactionNameSource, @NotNull java.lang.String operation, @Nullable TracesSamplingDecision samplingDecision)
CreatesTransactionContext
with explicit sampling decision and name source.TransactionContext(@NotNull java.lang.String name, @NotNull java.lang.String operation)
TransactionContext(@NotNull java.lang.String name, @NotNull java.lang.String operation, @Nullable TracesSamplingDecision samplingDecision)
CreatesTransactionContext
with explicit sampling decision.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static @NotNull TransactionContext
fromSentryTrace(@NotNull java.lang.String name, @NotNull TransactionNameSource transactionNameSource, @NotNull java.lang.String operation, @NotNull SentryTraceHeader sentryTrace)
CreatesTransactionContext
from sentry-trace header.static @NotNull TransactionContext
fromSentryTrace(@NotNull java.lang.String name, @NotNull java.lang.String operation, @NotNull SentryTraceHeader sentryTrace)
CreatesTransactionContext
from sentry-trace header.@NotNull java.lang.String
getName()
@Nullable java.lang.Boolean
getParentSampled()
@Nullable TracesSamplingDecision
getParentSamplingDecision()
@NotNull TransactionNameSource
getTransactionNameSource()
void
setParentSampled(@Nullable java.lang.Boolean parentSampled)
void
setParentSampled(@Nullable java.lang.Boolean parentSampled, @Nullable java.lang.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 Detail
-
TransactionContext
public TransactionContext(@NotNull @NotNull java.lang.String name, @NotNull @NotNull java.lang.String operation)
-
TransactionContext
@Internal public TransactionContext(@NotNull @NotNull java.lang.String name, @NotNull @NotNull TransactionNameSource transactionNameSource, @NotNull @NotNull java.lang.String operation)
-
TransactionContext
public TransactionContext(@NotNull @NotNull java.lang.String name, @NotNull @NotNull java.lang.String operation, @Nullable @Nullable TracesSamplingDecision samplingDecision)
CreatesTransactionContext
with explicit sampling decision.- Parameters:
name
- - transaction nameoperation
- - operationsamplingDecision
- - sampling decision
-
TransactionContext
@Internal public TransactionContext(@NotNull @NotNull java.lang.String name, @NotNull @NotNull TransactionNameSource transactionNameSource, @NotNull @NotNull java.lang.String operation, @Nullable @Nullable TracesSamplingDecision samplingDecision)
CreatesTransactionContext
with explicit sampling decision and name source.- Parameters:
name
- - transaction nameoperation
- - operationsamplingDecision
- - sampling decision
-
-
Method Detail
-
fromSentryTrace
@NotNull public static @NotNull TransactionContext fromSentryTrace(@NotNull @NotNull java.lang.String name, @NotNull @NotNull java.lang.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 java.lang.String name, @NotNull @NotNull TransactionNameSource transactionNameSource, @NotNull @NotNull java.lang.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
-
getName
@NotNull public @NotNull java.lang.String getName()
-
getParentSampled
@Nullable public @Nullable java.lang.Boolean getParentSampled()
-
getParentSamplingDecision
@Nullable public @Nullable TracesSamplingDecision getParentSamplingDecision()
-
setParentSampled
public void setParentSampled(@Nullable @Nullable java.lang.Boolean parentSampled)
-
setParentSampled
public void setParentSampled(@Nullable @Nullable java.lang.Boolean parentSampled, @Nullable @Nullable java.lang.Boolean parentProfileSampled)
-
getTransactionNameSource
@NotNull public @NotNull TransactionNameSource getTransactionNameSource()
-
-