Entry represents one key-value pair in a list of key-value pair of Tracestate.
type Entry struct { // Key is an opaque string up to 256 characters printable. It MUST begin with a lowercase letter, // and can only contain lowercase letters a-z, digits 0-9, underscores _, dashes -, asterisks *, and // forward slashes /. Key string // Value is an opaque string up to 256 characters printable ASCII RFC0020 characters (i.e., the // range 0x20 to 0x7E) except comma , and =. Value string }
Tracestate represents tracing-system specific context in a list of key-value pairs. Tracestate allows different vendors propagate additional information and inter-operate with their legacy Id formats.
type Tracestate struct {
// contains filtered or unexported fields
}
func New(parent *Tracestate, entries ...Entry) (*Tracestate, error)
New creates a Tracestate object from a parent and/or entries (key-value pair). Entries from the parent are copied if present. The entries passed to this function are inserted in front of those copied from the parent. If an entry copied from the parent contains the same key as one of the entry in entries then the entry copied from the parent is removed. See add func.
An error is returned with nil Tracestate if
func (ts *Tracestate) Entries() []Entry
Entries returns a slice of Entry.