Version: 10.16.0
Class

solace.TraceContextSetter

Contents

class solace.TraceContextSetter

Abstract constructor for metadata used for distributed message tracing.

Constructor Top

  TraceContextSetter ( )

Static Properties & Enumerations Top

SPAN_ID_BYTES_LENGTH
TRACE_ID_BYTES_LENGTH

Properties Top

version

Static Methods Top

solace.TraceContextSetter | null fromTraceContext ( Buffer | Uint8Array | String | null traceContextValue )

Methods Top

TraceContextSetter clone ( )
void setSampled ( Boolean value )
void setSpanId ( String value )
void setTraceId ( String value )
void setTraceState ( String value )
void setVersion ( Number value )

Constructor details Top

TraceContextSetter ( )

Abstract constructor for metadata used for distributed message tracing.

Static Properties & Enumerations Detail Top

static public SPAN_ID_BYTES_LENGTH

The length of the spanId bytes in the binary message

static public TRACE_ID_BYTES_LENGTH

The length of the traceId bytes in the binary message

Static Methods Detail Top

static public solace.TraceContextSetter | null fromTraceContext ( Buffer | Uint8Array | String | null traceContextValue )

Gets a new instance of the Message Trace Context Setter from the values in the SMF header associated with the message.

Parameters

Buffer | Uint8Array | String | null traceContextValue

The value of trace context associated with the message

Return Value

solace.TraceContextSetter | null

Context setter object

Properties Detail Top

public version

The version which for now is 1. -> 0001

Methods Detail Top

public TraceContextSetter clone ( )

Clone this TraceContextSetter object.

Return Value

TraceContextSetter

the cloned TraceContextSetter instance

public void setSampled ( Boolean value )

Turns on or off sampling for the associated message.

Parameters

Boolean value

if true sampling is on, off otherwise

Return Value

void

public void setSpanId ( String value )

Sets the value of the span identifier associated with the message.

Parameters

String value

The trace identifier encoded as a 8-length Hex string

Return Value

void

public void setTraceId ( String value )

Sets the value of the trace identifier associated with the message.

Parameters

String value

The trace identifier encoded as a 16-length Hex string

Return Value

void

public void setTraceState ( String value )

Sets the value of the trace state associated with the message.

See w3c trace state format specification

Parameters

String value

The value of trace state associated with the message

(Optional)

Return Value

void

public void setVersion ( Number value )

Sets the version

Parameters

Number value

The version encoded as Hex value

Return Value

void