Skip to main content
Defined in: telemetry/types.ts:162 Tracing facade of a bot (bot.tracing), also used by plugins (@botmesh/ai). Without BotConfig.telemetry it is a no-op (enabled === false).

Properties

enabled

Defined in: telemetry/types.ts:163

Methods

startSpan()

Defined in: telemetry/types.ts:164

Parameters

Returns

BotSpan

activeSpan()

Defined in: telemetry/types.ts:166 The span the current async chain runs under (core context), if any.

Returns

BotSpan | undefined

withSpan()

Defined in: telemetry/types.ts:168 Run fn with span active (core context and the backend’s). Returns fn’s value unchanged.

Type Parameters

Parameters

Returns

T

trace()

Defined in: telemetry/types.ts:174 Start a span, run fn inside it and end it when fn returns or its promise settles (a throw/rejection sets status error and records the sanitized exception). Returns fn’s own value or promise — never a derived one.

Type Parameters

Parameters

Returns

T

recordError()

Defined in: telemetry/types.ts:176 Record a sanitized error on span (status error, error.type, exception event).

Parameters

Returns

void

idAttribute()

Defined in: telemetry/types.ts:178 Apply the ids policy to an id (undefined under 'omit'). For plugins that tag their own spans.

Parameters

Returns

string | undefined