You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Construct a new TraceParent instance from an existing buffer. The contents are binary data that corresponds to the structure of the W3C traceparent header format, with separators removed.
Resume from a parent context, if given, or start a new context. Accepts another TraceParent instance, a W3C traceparent header string, or a Span or Transaction instance from elastic-apm-node.
Requires a settings object with a transactionSampleRate value from 0.0 to 1.0 to generate a sampling decision for the context. This will only be applied when starting a new context. When continuing an existing context, the sampling decision will be propagated into all child contexts.
traceParent.recorded
Returns true if this TraceParent is sampled.
traceParent.traceId
The traceId property will propagate through all children in the tree to link them all together.
traceParent.id
The id property is used to uniquely identify a given TraceParent instance within the tree.
traceParent.parentId
The parentId property links this context to its direct parent in the tree.
traceParent.flags
The flags property is used to store metadata such as the sampling decision.
Return the parent ID, if there is none, generate one. This is useful in browser instrumentation to produce a starting span around a browser request which was not instrumented prior to page load.