Package io.sentry
Class SpanContext
java.lang.Object
io.sentry.SpanContext
- All Implemented Interfaces:
JsonSerializable,JsonUnknown
- Direct Known Subclasses:
TransactionContext
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classstatic final class -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected @Nullable StringLonger description of the span's operation, which uniquely identifies the span but is consistent across instances of the span.protected @NotNull StringShort code identifying the type of operation the span is measuring.protected @Nullable StringDescribes the status of the Transaction.protected @Nullable SpanStatusDescribes the status of the Transaction.A map or list of tags for this event.static final String -
Constructor Summary
ConstructorsConstructorDescriptionSpanContext(@NotNull SentryId traceId, @NotNull SpanId spanId, @NotNull String operation, @Nullable SpanId parentSpanId, @Nullable TracesSamplingDecision samplingDecision) SpanContext(@NotNull SentryId traceId, @NotNull SpanId spanId, @Nullable SpanId parentSpanId, @NotNull String operation, @Nullable String description, @Nullable TracesSamplingDecision samplingDecision, @Nullable SpanStatus status, @Nullable String origin) SpanContext(@NotNull SpanContext spanContext) Copy constructor.SpanContext(@NotNull String operation) Creates trace context with deferred sampling decision.SpanContext(@NotNull String operation, @Nullable TracesSamplingDecision samplingDecision) -
Method Summary
Modifier and TypeMethodDescriptionboolean@Nullable String@NotNull String@Nullable String@Nullable SpanId@Nullable Boolean@Nullable Boolean@Nullable TracesSamplingDecision@NotNull SpanId@Nullable SpanStatusgetTags()@NotNull SentryIdinthashCode()voidserialize(@NotNull ObjectWriter writer, @NotNull ILogger logger) voidsetDescription(@Nullable String description) voidsetOperation(@NotNull String operation) voidvoidsetSampled(@Nullable Boolean sampled) voidsetSampled(@Nullable Boolean sampled, @Nullable Boolean profileSampled) voidsetSamplingDecision(@Nullable TracesSamplingDecision samplingDecision) voidsetStatus(@Nullable SpanStatus status) voidvoidsetUnknown(@Nullable Map<String, Object> unknown)
-
Field Details
-
TYPE
- See Also:
-
op
Short code identifying the type of operation the span is measuring. -
description
Longer description of the span's operation, which uniquely identifies the span but is consistent across instances of the span. -
status
Describes the status of the Transaction. -
tags
A map or list of tags for this event. Each tag must be less than 200 characters. -
origin
Describes the status of the Transaction.
-
-
Constructor Details
-
SpanContext
public SpanContext(@NotNull @NotNull String operation, @Nullable @Nullable TracesSamplingDecision samplingDecision) -
SpanContext
Creates trace context with deferred sampling decision.- Parameters:
operation- the operation
-
SpanContext
public SpanContext(@NotNull @NotNull SentryId traceId, @NotNull @NotNull SpanId spanId, @NotNull @NotNull String operation, @Nullable @Nullable SpanId parentSpanId, @Nullable @Nullable TracesSamplingDecision samplingDecision) -
SpanContext
@Internal public SpanContext(@NotNull @NotNull SentryId traceId, @NotNull @NotNull SpanId spanId, @Nullable @Nullable SpanId parentSpanId, @NotNull @NotNull String operation, @Nullable @Nullable String description, @Nullable @Nullable TracesSamplingDecision samplingDecision, @Nullable @Nullable SpanStatus status, @Nullable @Nullable String origin) -
SpanContext
Copy constructor.- Parameters:
spanContext- the spanContext to copy
-
-
Method Details
-
setOperation
-
setTag
-
setDescription
-
setStatus
-
getTraceId
-
getSpanId
-
getParentSpanId
-
getOperation
-
getDescription
-
getStatus
-
getTags
-
getSamplingDecision
-
getSampled
-
getProfileSampled
-
setSampled
-
setSampled
-
setSamplingDecision
@Internal public void setSamplingDecision(@Nullable @Nullable TracesSamplingDecision samplingDecision) -
getOrigin
-
setOrigin
-
equals
-
hashCode
public int hashCode() -
serialize
public void serialize(@NotNull @NotNull ObjectWriter writer, @NotNull @NotNull ILogger logger) throws IOException - Specified by:
serializein interfaceJsonSerializable- Throws:
IOException
-
getUnknown
- Specified by:
getUnknownin interfaceJsonUnknown
-
setUnknown
- Specified by:
setUnknownin interfaceJsonUnknown
-