Skip to main content

MarkerSpanCallbacktype alias

Callback function type for creating marker spans in User Journey or Clickstream traces.

MarkerSpanCallback()

type MarkerSpanCallback = (source: string, data?: DataByVerbosity, newTrace?: boolean, parentSpan?: PropagationInfo) => Promise<PropagationInfo | null> | void;

Parameters (4)

Name Type Required Description
source⚓︎ string
  • Descriptive name for the marker span (e.g., "checkout-completed", "navigation-event"). If not provided, no new span will be created, and the data will simply be added to the current user journey or clickstream span.
data⚓︎ DataByVerbosity x
  • Optional span data organized by verbosity level, allowing different detail levels for different environments
newTrace⚓︎ boolean x x
parentSpan⚓︎ PropagationInfo x x

Returns

Either PropagationInfo to link the marker span to other traces, or void