[KongchangAI]
ConceptOpenTelemetry ID Generator

OpenTelemetryIdGenerator

A custom OpenTelemetry ID generator implementation provided by the AI SDK. It allows the same trace ID generation and sampling decision logic to be reused across different execution stages of a persistent agent.

Timeline (last 90 days)

Nov 3

When used with OpenTelemetry, the same OpenTelemetryIdGenerator instance needs to be passed both to the tracer provider's idGenerator and sampler and to new OpenTelemetry({ durable }).

Unverified50%
Nov 3

Explicitly bridging OpenTelemetryIdGenerator enables the parent trace context and sampling decisions to be passed between steps, with model spans reported in real time and the complete invoke_agent call tree reconstructed when the run completes.

Unverified50%
Nov 3

In OpenTelemetry, the IdGenerator is responsible for generating the Trace ID and Span ID for each span, and the Sampler decides whether a given trace is sampled and at what sampling rate; injecting the same OpenTelemetryIdGenerator instance into both idGenerator and sampler ensures that ID generation and sampling decisions share the same state, avoiding broken traces or inconsistent sampling.

Unverified50%

All Facts (3)

Source Articles