Skip to main content

%Trace.SpanContext

class %Trace.SpanContext extends %Library.RegisteredObject

Uniquely identifies a Span. Used as the 'parent' to create related Spans.

Property Inventory

Method Inventory

Properties

property IsRemote as %Boolean [ InitialExpression = 0 ];
Flag which indicates if the SpanContext is from another system. False if SpanContext was locally generated, otherwise true.
Property methods: IsRemoteDisplayToLogical(), IsRemoteGet(), IsRemoteIsValid(), IsRemoteLogicalToDisplay(), IsRemoteNormalize(), IsRemoteSet()
property SpanId as %String [ InitialExpression = $$$InvalidSpanId ];
Span identifier for a Span (8 character, i.e. byte, hex string). SpanId is generated at StartSpan.
Property methods: SpanIdDisplayToLogical(), SpanIdGet(), SpanIdIsValid(), SpanIdLogicalToDisplay(), SpanIdLogicalToOdbc(), SpanIdNormalize(), SpanIdSet()
property TraceFlags as %Integer [ InitialExpression = 0 ];
Bit map of Trace flags. First bit (and only bit so far) is for 'sampled'. See bit definitions in %syMonitor.
Property methods: TraceFlagsDisplayToLogical(), TraceFlagsGet(), TraceFlagsIsValid(), TraceFlagsLogicalToDisplay(), TraceFlagsNormalize(), TraceFlagsSet()
property TraceId as %String [ InitialExpression = $$$InvalidTraceId ];
Trace identifier for a Span (16 character, i.e. byte, hex string). TraceId is generated at StartSpan.
Property methods: TraceIdDisplayToLogical(), TraceIdGet(), TraceIdIsValid(), TraceIdLogicalToDisplay(), TraceIdLogicalToOdbc(), TraceIdNormalize(), TraceIdSet()
property TraceState as array of %String;
List of key-value pairs that can carry vendor-specific trace information. These should follow the W3C tracestate header rules. Keys should contain only lowercase alphanumeric characters, underscores, dashes, asterisks, and forward slashes. Keys and Values should not contain the ',' or '=' characters.
Property methods: TraceStateBuildValueArray(), TraceStateCollectionToDisplay(), TraceStateCollectionToOdbc(), TraceStateDisplayToCollection(), TraceStateDisplayToLogical(), TraceStateGet(), TraceStateGetObject(), TraceStateGetObjectId(), TraceStateGetSwizzled(), TraceStateIsValid(), TraceStateLogicalToDisplay(), TraceStateLogicalToOdbc(), TraceStateNormalize(), TraceStateOdbcToCollection(), TraceStateSet(), TraceStateSetObject(), TraceStateSetObjectId()

Methods

method IsValid() as %Boolean
Returns true if both TraceID and SpanID are valid strings.
method StateToString() as %String
Format the TraceState as a string in W3C format
method ToString() as %String
Format the SpanContext as a string in W3C format

Inherited Members

Inherited Methods

FeedbackOpens in a new tab