Package io.sentry.util
Class TracingUtils
java.lang.Object
io.sentry.util.TracingUtils
-
Nested Class Summary
Nested Classes -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic @NotNull Baggage
ensureBaggage
(@Nullable Baggage incomingBaggage, @Nullable TracesSamplingDecision decision) Ensures a non null baggage instance is present by creating a new Baggage instance if null is passed in.static @NotNull Baggage
ensureBaggage
(@Nullable Baggage incomingBaggage, @Nullable Boolean decisionSampled, @Nullable Double decisionSampleRate, @Nullable Double decisionSampleRand) Ensures a non null baggage instance is present by creating a new Baggage instance if null is passed in.static boolean
isIgnored
(@Nullable List<FilterString> ignoredTransactions, @Nullable String transactionName) Checks if a transaction is to be ignored.static @NotNull PropagationContext
maybeUpdateBaggage
(@NotNull IScope scope, @NotNull SentryOptions sentryOptions) static void
startNewTrace
(@NotNull IScopes scopes) static @Nullable TracingUtils.TracingHeaders
trace
(@NotNull IScopes scopes, @Nullable List<String> thirdPartyBaggageHeaders, @Nullable ISpan span) static @Nullable TracingUtils.TracingHeaders
traceIfAllowed
(@NotNull IScopes scopes, @NotNull String requestUrl, @Nullable List<String> thirdPartyBaggageHeaders, @Nullable ISpan span)
-
Constructor Details
-
TracingUtils
public TracingUtils()
-
-
Method Details
-
startNewTrace
-
traceIfAllowed
-
trace
@Nullable public static @Nullable TracingUtils.TracingHeaders trace(@NotNull @NotNull IScopes scopes, @Nullable @Nullable List<String> thirdPartyBaggageHeaders, @Nullable @Nullable ISpan span) -
maybeUpdateBaggage
@NotNull public static @NotNull PropagationContext maybeUpdateBaggage(@NotNull @NotNull IScope scope, @NotNull @NotNull SentryOptions sentryOptions) -
isIgnored
@Internal public static boolean isIgnored(@Nullable @Nullable List<FilterString> ignoredTransactions, @Nullable @Nullable String transactionName) Checks if a transaction is to be ignored. -
ensureBaggage
@Internal @NotNull public static @NotNull Baggage ensureBaggage(@Nullable @Nullable Baggage incomingBaggage, @Nullable @Nullable TracesSamplingDecision decision) Ensures a non null baggage instance is present by creating a new Baggage instance if null is passed in.Also ensures there is a sampleRand value present on the baggage if it is still mutable. If the baggage should be frozen, it also takes care of freezing it.
- Parameters:
incomingBaggage
- a nullable baggage instance, if null a new one will be createddecision
- a TracesSamplingDecision for potentially backfilling sampleRand to match that decision- Returns:
- previous baggage instance or a new one
-
ensureBaggage
@Internal @NotNull public static @NotNull Baggage ensureBaggage(@Nullable @Nullable Baggage incomingBaggage, @Nullable @Nullable Boolean decisionSampled, @Nullable @Nullable Double decisionSampleRate, @Nullable @Nullable Double decisionSampleRand) Ensures a non null baggage instance is present by creating a new Baggage instance if null is passed in.Also ensures there is a sampleRand value present on the baggage if it is still mutable. If the baggage should be frozen, it also takes care of freezing it.
- Parameters:
incomingBaggage
- a nullable baggage instance, if null a new one will be createddecisionSampled
- sampled decision for potential backfillingdecisionSampleRate
- sampleRate for potential backfillingdecisionSampleRand
- sampleRand to be used if none in baggage- Returns:
- previous baggage instance or a new one
-