StartSpanOptions interface

Options accepted by TracingPlugin#startSpan().

Signature:

export interface StartSpanOptions 

Properties

Property

Modifiers

Type

Description

childOf?

any

(Optional) Span to parent the new one to. Pass null explicitly to force a root span — omitting it lets the tracer pick whatever is active, which is rarely what an entry point wants.

kind?

string

(Optional) Datadog span kind, 'client' or 'server'.

meta?

Record<string, any>

(Optional) String tags for the span.

metrics?

Record<string, number>

(Optional) Numeric measurements for the span.

resource?

string

(Optional) What the span operated on — the field Datadog groups by.

service?

string

(Optional) Service the span is attributed to.

type?

string

(Optional) Span type, e.g. 'messaging'.

Read this page as plain markdown — no HTML, no navigation. For pasting into an LLM, or for an agent to fetch.