Package io.sentry.opentelemetry
Class OtelSpanWrapper
java.lang.Object
io.sentry.opentelemetry.OtelSpanWrapper
- All Implemented Interfaces:
io.sentry.ISpan,io.sentry.opentelemetry.IOtelSpanWrapper
@Internal
public final class OtelSpanWrapper
extends Object
implements io.sentry.opentelemetry.IOtelSpanWrapper
NOTE: This wrapper is not used when using OpenTelemetry API, only when using Sentry API.
-
Constructor Summary
ConstructorsConstructorDescriptionOtelSpanWrapper(@NotNull io.opentelemetry.sdk.trace.ReadWriteSpan span, @NotNull io.sentry.IScopes scopes, @NotNull io.sentry.SentryDate startTimestamp, @Nullable io.sentry.TracesSamplingDecision samplingDecision, @Nullable io.sentry.opentelemetry.IOtelSpanWrapper parentSpan, @Nullable io.sentry.SpanId parentSpanId, @Nullable io.sentry.Baggage baggage) -
Method Summary
Modifier and TypeMethodDescriptionvoidfinish()voidfinish(@Nullable io.sentry.SpanStatus status) voidfinish(@Nullable io.sentry.SpanStatus status, @Nullable io.sentry.SentryDate timestamp) @NotNull io.sentry.protocol.ContextsgetData()@Nullable Object@Nullable String@Nullable io.sentry.SentryDate@Nullable io.opentelemetry.api.common.Attributes@NotNull String@Nullable io.sentry.TracesSamplingDecision@NotNull io.sentry.IScopes@NotNull io.sentry.SpanContext@NotNull io.sentry.SentryDate@Nullable io.sentry.SpanStatus@Nullable StringgetTags()@Nullable Throwable@NotNull io.sentry.protocol.SentryId@Nullable String@Nullable io.sentry.protocol.TransactionNameSourcebooleanbooleanisNoOp()@Nullable Boolean@Nullable Boolean@NotNull io.sentry.ISentryLifecycleTokenvoidsetContext(@Nullable String key, @Nullable Object context) voidvoidsetDescription(@Nullable String description) voidsetMeasurement(@NotNull String name, @NotNull Number value) voidsetMeasurement(@NotNull String name, @NotNull Number value, @NotNull io.sentry.MeasurementUnit unit) voidsetOperation(@NotNull String operation) voidsetStatus(@Nullable io.sentry.SpanStatus status) voidvoidsetThrowable(@Nullable Throwable throwable) voidsetTransactionName(@NotNull String name) voidsetTransactionName(@NotNull String name, @NotNull io.sentry.protocol.TransactionNameSource nameSource) @NotNull io.sentry.ISpanstartChild(@NotNull io.sentry.SpanContext spanContext, @NotNull io.sentry.SpanOptions spanOptions) @NotNull io.sentry.ISpanstartChild(@NotNull String operation) @NotNull io.sentry.ISpanstartChild(@NotNull String operation, @Nullable String description) @NotNull io.sentry.ISpanstartChild(@NotNull String operation, @Nullable String description, @NotNull io.sentry.SpanOptions spanOptions) @NotNull io.sentry.ISpanstartChild(@NotNull String operation, @Nullable String description, @Nullable io.sentry.SentryDate timestamp, @NotNull io.sentry.Instrumenter instrumenter) @NotNull io.sentry.ISpanstartChild(@NotNull String operation, @Nullable String description, @Nullable io.sentry.SentryDate timestamp, @NotNull io.sentry.Instrumenter instrumenter, @NotNull io.sentry.SpanOptions spanOptions) @NotNull io.opentelemetry.context.ContextstoreInContext(io.opentelemetry.context.Context context) @Nullable io.sentry.BaggageHeadertoBaggageHeader(@Nullable List<String> thirdPartyBaggageHeaders) @NotNull io.sentry.SentryTraceHeader@Nullable io.sentry.TraceContextbooleanupdateEndDate(@NotNull io.sentry.SentryDate date)
-
Constructor Details
-
OtelSpanWrapper
public OtelSpanWrapper(@NotNull @NotNull io.opentelemetry.sdk.trace.ReadWriteSpan span, @NotNull @NotNull io.sentry.IScopes scopes, @NotNull @NotNull io.sentry.SentryDate startTimestamp, @Nullable @Nullable io.sentry.TracesSamplingDecision samplingDecision, @Nullable @Nullable io.sentry.opentelemetry.IOtelSpanWrapper parentSpan, @Nullable @Nullable io.sentry.SpanId parentSpanId, @Nullable @Nullable io.sentry.Baggage baggage)
-
-
Method Details
-
startChild
- Specified by:
startChildin interfaceio.sentry.ISpan
-
startChild
@NotNull public @NotNull io.sentry.ISpan startChild(@NotNull @NotNull String operation, @Nullable @Nullable String description, @NotNull @NotNull io.sentry.SpanOptions spanOptions) - Specified by:
startChildin interfaceio.sentry.ISpan
-
startChild
@NotNull public @NotNull io.sentry.ISpan startChild(@NotNull @NotNull io.sentry.SpanContext spanContext, @NotNull @NotNull io.sentry.SpanOptions spanOptions) - Specified by:
startChildin interfaceio.sentry.ISpan
-
startChild
@NotNull public @NotNull io.sentry.ISpan startChild(@NotNull @NotNull String operation, @Nullable @Nullable String description, @Nullable @Nullable io.sentry.SentryDate timestamp, @NotNull @NotNull io.sentry.Instrumenter instrumenter) - Specified by:
startChildin interfaceio.sentry.ISpan
-
startChild
@NotNull public @NotNull io.sentry.ISpan startChild(@NotNull @NotNull String operation, @Nullable @Nullable String description, @Nullable @Nullable io.sentry.SentryDate timestamp, @NotNull @NotNull io.sentry.Instrumenter instrumenter, @NotNull @NotNull io.sentry.SpanOptions spanOptions) - Specified by:
startChildin interfaceio.sentry.ISpan
-
startChild
@NotNull public @NotNull io.sentry.ISpan startChild(@NotNull @NotNull String operation, @Nullable @Nullable String description) - Specified by:
startChildin interfaceio.sentry.ISpan
-
toSentryTrace
@NotNull public @NotNull io.sentry.SentryTraceHeader toSentryTrace()- Specified by:
toSentryTracein interfaceio.sentry.ISpan
-
getOpenTelemetrySpanAttributes
@Internal @Nullable public @Nullable io.opentelemetry.api.common.Attributes getOpenTelemetrySpanAttributes()- Specified by:
getOpenTelemetrySpanAttributesin interfaceio.sentry.opentelemetry.IOtelSpanWrapper
-
traceContext
@Nullable public @Nullable io.sentry.TraceContext traceContext()- Specified by:
traceContextin interfaceio.sentry.ISpan
-
toBaggageHeader
@Nullable public @Nullable io.sentry.BaggageHeader toBaggageHeader(@Nullable @Nullable List<String> thirdPartyBaggageHeaders) - Specified by:
toBaggageHeaderin interfaceio.sentry.ISpan
-
finish
public void finish()- Specified by:
finishin interfaceio.sentry.ISpan
-
finish
public void finish(@Nullable @Nullable io.sentry.SpanStatus status) - Specified by:
finishin interfaceio.sentry.ISpan
-
finish
public void finish(@Nullable @Nullable io.sentry.SpanStatus status, @Nullable @Nullable io.sentry.SentryDate timestamp) - Specified by:
finishin interfaceio.sentry.ISpan
-
setOperation
- Specified by:
setOperationin interfaceio.sentry.ISpan
-
getOperation
- Specified by:
getOperationin interfaceio.sentry.ISpan
-
setDescription
- Specified by:
setDescriptionin interfaceio.sentry.ISpan
-
getDescription
- Specified by:
getDescriptionin interfaceio.sentry.ISpan
-
setStatus
public void setStatus(@Nullable @Nullable io.sentry.SpanStatus status) - Specified by:
setStatusin interfaceio.sentry.ISpan
-
getStatus
@Nullable public @Nullable io.sentry.SpanStatus getStatus()- Specified by:
getStatusin interfaceio.sentry.ISpan
-
setThrowable
- Specified by:
setThrowablein interfaceio.sentry.ISpan
-
getThrowable
- Specified by:
getThrowablein interfaceio.sentry.ISpan
-
getSpanContext
@NotNull public @NotNull io.sentry.SpanContext getSpanContext()- Specified by:
getSpanContextin interfaceio.sentry.ISpan
-
setTag
- Specified by:
setTagin interfaceio.sentry.ISpan
-
getTag
- Specified by:
getTagin interfaceio.sentry.ISpan
-
getTags
- Specified by:
getTagsin interfaceio.sentry.opentelemetry.IOtelSpanWrapper
-
isFinished
public boolean isFinished()- Specified by:
isFinishedin interfaceio.sentry.ISpan
-
setData
- Specified by:
setDatain interfaceio.sentry.ISpan
-
getData
- Specified by:
getDatain interfaceio.sentry.ISpan
-
setMeasurement
- Specified by:
setMeasurementin interfaceio.sentry.ISpan
-
setMeasurement
public void setMeasurement(@NotNull @NotNull String name, @NotNull @NotNull Number value, @NotNull @NotNull io.sentry.MeasurementUnit unit) - Specified by:
setMeasurementin interfaceio.sentry.ISpan
-
updateEndDate
public boolean updateEndDate(@NotNull @NotNull io.sentry.SentryDate date) - Specified by:
updateEndDatein interfaceio.sentry.ISpan
-
getStartDate
@NotNull public @NotNull io.sentry.SentryDate getStartDate()- Specified by:
getStartDatein interfaceio.sentry.ISpan
-
getFinishDate
@Nullable public @Nullable io.sentry.SentryDate getFinishDate()- Specified by:
getFinishDatein interfaceio.sentry.ISpan
-
isNoOp
public boolean isNoOp()- Specified by:
isNoOpin interfaceio.sentry.ISpan
-
setContext
- Specified by:
setContextin interfaceio.sentry.ISpan
-
getContexts
@NotNull public @NotNull io.sentry.protocol.Contexts getContexts()- Specified by:
getContextsin interfaceio.sentry.ISpan
-
setTransactionName
- Specified by:
setTransactionNamein interfaceio.sentry.opentelemetry.IOtelSpanWrapper
-
setTransactionName
public void setTransactionName(@NotNull @NotNull String name, @NotNull @NotNull io.sentry.protocol.TransactionNameSource nameSource) - Specified by:
setTransactionNamein interfaceio.sentry.opentelemetry.IOtelSpanWrapper
-
getTransactionNameSource
@Internal @Nullable public @Nullable io.sentry.protocol.TransactionNameSource getTransactionNameSource()- Specified by:
getTransactionNameSourcein interfaceio.sentry.opentelemetry.IOtelSpanWrapper
-
getTransactionName
- Specified by:
getTransactionNamein interfaceio.sentry.opentelemetry.IOtelSpanWrapper
-
getTraceId
@NotNull public @NotNull io.sentry.protocol.SentryId getTraceId()- Specified by:
getTraceIdin interfaceio.sentry.opentelemetry.IOtelSpanWrapper
-
getData
- Specified by:
getDatain interfaceio.sentry.opentelemetry.IOtelSpanWrapper
-
getMeasurements
- Specified by:
getMeasurementsin interfaceio.sentry.opentelemetry.IOtelSpanWrapper
-
isSampled
- Specified by:
isSampledin interfaceio.sentry.ISpan
-
isProfileSampled
- Specified by:
isProfileSampledin interfaceio.sentry.opentelemetry.IOtelSpanWrapper
-
getSamplingDecision
@Nullable public @Nullable io.sentry.TracesSamplingDecision getSamplingDecision()- Specified by:
getSamplingDecisionin interfaceio.sentry.ISpan
-
getScopes
@Internal @NotNull public @NotNull io.sentry.IScopes getScopes()- Specified by:
getScopesin interfaceio.sentry.opentelemetry.IOtelSpanWrapper
-
storeInContext
@NotNull public @NotNull io.opentelemetry.context.Context storeInContext(io.opentelemetry.context.Context context) - Specified by:
storeInContextin interfaceio.sentry.opentelemetry.IOtelSpanWrapper
-
makeCurrent
@Internal @NotNull public @NotNull io.sentry.ISentryLifecycleToken makeCurrent()- Specified by:
makeCurrentin interfaceio.sentry.ISpan
-