ReadonlyisCheck if the trace state list is empty, meaning it has no keys or values. This exists to allow for quick checks without needing to create a new array of keys.
ReadonlykeysReturns a readonly array of the current keys associated with the trace state, keys are returned in the required processing order and if this instance has a parent the keys from the parent will be included unless they have been removed (deleted) from the child instance. Once created any modifications to the parent will also be reflected in the child, this is different from the OpenTelemetry implementation which creates a new instance for each call.
Create a new instance of IW3cTraceState which is a child of this instance, meaning it will inherit the keys and values from this instance but any changes made to the child will not affect this instance.
A new instance of IW3cTraceState which is a child of this instance
Format the trace state list into a strings where each string can be used as a header value. This will return an empty array if the trace state list is empty.
OptionalmaxHeaders: numberThe maximum number of entries to include in the output, once the limit is reached no more entries will be included
OptionalmaxKeys: numberThe maximum number of keys to include in the output, once the limit is reached no more keys will be included
OptionalmaxLen: numberThe maximum length of each header value, once the limit is reached a new header value will be created
An array of strings that can be used for the header values, if the trace state list is empty an empty array will be returned
Set the value for the specified key for this instance, returning its new location within the list.
The key to set
The value to set
0 if successful, -1 if not
Represents a mutable W3C trace state list, this is a list of key/value pairs that are used to pass trace state information between different tracing systems. The list is ordered and the order is important as it determines the processing order.
Importantly instances of this type are mutable, change made to an instance via IW3cTraceState.set or IW3cTraceState.del will be reflected on the instance and any child instances that use it as a parent. However, any parent instance associated with an instance will not be modified by operations on that particular instance.
Since
3.4.0