public class SpanContext
extends java.lang.Object
| Modifier and Type | Field and Description |
|---|---|
protected @Nullable java.lang.String |
description
Longer description of the span's operation, which uniquely identifies the span but is
consistent across instances of the span.
|
protected @NotNull java.lang.String |
op
Short code identifying the type of operation the span is measuring.
|
protected @Nullable SpanStatus |
status
Describes the status of the Transaction.
|
protected @NotNull java.util.Map<java.lang.String,java.lang.String> |
tags
A map or list of tags for this event.
|
static java.lang.String |
TYPE |
| Constructor and Description |
|---|
SpanContext(@NotNull SentryId traceId,
@NotNull SpanId spanId,
@NotNull java.lang.String operation,
@Nullable SpanId parentSpanId,
@Nullable java.lang.Boolean sampled) |
SpanContext(@NotNull SpanContext spanContext)
Copy constructor.
|
SpanContext(@NotNull java.lang.String operation)
Creates trace context with deferred sampling decision.
|
SpanContext(@NotNull java.lang.String operation,
@Nullable java.lang.Boolean sampled) |
| Modifier and Type | Method and Description |
|---|---|
@Nullable java.lang.String |
getDescription() |
@NotNull java.lang.String |
getOperation() |
@Nullable SpanId |
getParentSpanId() |
@Nullable java.lang.Boolean |
getSampled() |
@NotNull SpanId |
getSpanId() |
@Nullable SpanStatus |
getStatus() |
@NotNull java.util.Map<java.lang.String,java.lang.String> |
getTags() |
@NotNull SentryId |
getTraceId() |
void |
setDescription(@Nullable java.lang.String description) |
void |
setOperation(@NotNull java.lang.String operation) |
void |
setStatus(@Nullable SpanStatus status) |
void |
setTag(@NotNull java.lang.String name,
@NotNull java.lang.String value) |
public static final java.lang.String TYPE
@NotNull protected @NotNull java.lang.String op
@Nullable protected @Nullable java.lang.String description
@Nullable protected @Nullable SpanStatus status
@NotNull protected @NotNull java.util.Map<java.lang.String,java.lang.String> tags
public SpanContext(@NotNull
@NotNull java.lang.String operation,
@Nullable
@Nullable java.lang.Boolean sampled)
public SpanContext(@NotNull
@NotNull java.lang.String operation)
operation - the operationpublic SpanContext(@NotNull
@NotNull SentryId traceId,
@NotNull
@NotNull SpanId spanId,
@NotNull
@NotNull java.lang.String operation,
@Nullable
@Nullable SpanId parentSpanId,
@Nullable
@Nullable java.lang.Boolean sampled)
public SpanContext(@NotNull
@NotNull SpanContext spanContext)
spanContext - the spanContext to copypublic void setOperation(@NotNull
@NotNull java.lang.String operation)
public void setTag(@NotNull
@NotNull java.lang.String name,
@NotNull
@NotNull java.lang.String value)
public void setDescription(@Nullable
@Nullable java.lang.String description)
public void setStatus(@Nullable
@Nullable SpanStatus status)
@NotNull public @NotNull SentryId getTraceId()
@NotNull public @NotNull SpanId getSpanId()
@Nullable @TestOnly public @Nullable SpanId getParentSpanId()
@NotNull public @NotNull java.lang.String getOperation()
@Nullable public @Nullable java.lang.String getDescription()
@Nullable public @Nullable SpanStatus getStatus()
@NotNull public @NotNull java.util.Map<java.lang.String,java.lang.String> getTags()
@Nullable public @Nullable java.lang.Boolean getSampled()