Options
All
  • Public
  • Public/Protected
  • All
Menu

TraceState must be a class and not a simple object type because of the spec requirement (https://www.w3.org/TR/trace-context/#tracestate-field).

Here is the list of allowed mutations:

  • New key-value pair should be added into the beginning of the list
  • The value of any key can be updated. Modified keys MUST be moved to the beginning of the list.

Hierarchy

  • TraceState

Implements

Index

Constructors

  • new TraceState(rawTraceState?: string): TraceState

Methods

  • get(key: string): undefined | string
  • Returns the value to which the specified key is mapped, or undefined if this map contains no mapping for the key.

    Parameters

    • key: string

    Returns undefined | string

    the value to which the specified key is mapped, or undefined if this map contains no mapping for the key.

  • serialize(): string
  • Serializes the TraceState to a list as defined below. The list is a series of list-members separated by commas ,, and a list-member is a key/value pair separated by an equals sign =. Spaces and horizontal tabs surrounding list-members are ignored. There can be a maximum of 32 list-members in a list.

    Returns string

    the serialized string.

Generated using TypeDoc