Documentation ¶
Index ¶
Constants ¶
const IDKey traceIDKey = 0
IDKey is the key that references the trace ID inside context.
const SpanIDKey spanIDKey = 0
SpanIDKey is the key that references the span ID inside context.
Variables ¶
var DefaultGenerator = defaultIDGenerator()
DefaultGenerator is the default trace ID and span ID generator.
Functions ¶
Types ¶
type ID ¶
type ID [16]byte
ID is the unique identifier for an entire trace.
func ParseID ¶
ParseID returns a trace ID from a hexadecimal string if it meets the W3C specification. See more at: https://www.w3.org/TR/trace-context/#trace-id
type IDGenerator ¶
IDGenerator allows custom generators for TraceID and SpanID.
type SpanID ¶
type SpanID [8]byte
SpanID is the unique identifier for a span of a trace.
func ParseGoogleCloudSpanID ¶
ParseGoogleCloudSpanID returns a span ID from a string holding an unsigned int64 value.
func ParseOpenTelemetrySpanID ¶
ParseOpenTelemetrySpanID returns a span ID from a hexadecimal string if it meets the W3C specification. See more at: https://www.w3.org/TR/trace-context/#parent-id
func TryGetSpanID ¶
TryGetSpanID tries to get a previously saved span ID.