TracedOptions interface

Options for the traced method decorator. Every field is optional at the call site — traced() takes a Partial of this and fills the rest in.

Signature:

export interface TracedOptions 

Properties

Property

Modifiers

Type

Description

kind

TraceKind

Whether the decorated method represents work this process serves or work it calls out for. Decides the OpenTelemetry span kind, and is also recorded as the span.kind attribute. Defaults to TraceKind.SERVER.

tags?

TraceAttributes

(Optional) Extra attributes to set on every span the decorator creates. Applied after the automatic ones, so a key used here overrides the automatic value — including resource.name, if you want to name the operation yourself.

tracerName?

string

(Optional) Name of the tracer to create spans with, 'basic' when omitted. Only worth setting to separate one subsystem's spans from another's; it does not affect where spans are exported.

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