Instrumenting

Spans reach Breadcrumb three ways. They all normalize into the same trace model, so you can mix them freely in one app. Pick the method that fits what you’re tracing.

  • Vercel AI SDK — one line on your generateText / streamText calls.
  • Manual tracing — wrap any code in bc.trace() and nest spans.
  • OpenTelemetry — register a span processor on your own tracer provider, or ingest traces over HTTP from other services.

The AI SDK and manual APIs compose: calls made inside a bc.trace() callback nest into that trace automatically.

Next steps