Skip to content
WebMCP Agents
Esc
↑↓navigate↵open⌘Jpreview
On this page

@webmcp-agents/telemetry

@webmcp-agents/telemetry sends agent runs to any OpenTelemetry backend. Each API has one page, in Observability: this is the index.

@webmcp-agents/telemetry sends what your agents do to any backend that speaks OpenTelemetry: every model step from the chat handler, and each run and tool call from the page, through your own relay. Each API is documented once, on its page in Observability, where the options come from the source and the backend you picked carries from page to page. Start with Installation.

Experimental: new in 0.5.0. Span and attribute names follow the OpenTelemetry GenAI conventions, which are not stable yet.

pnpm add @webmcp-agents/telemetry @opentelemetry/api @opentelemetry/sdk-trace @ai-sdk/otel

The three OpenTelemetry packages are optional peers, loaded on the first request: without them the layer is off and says which to install.

@webmcp-agents/telemetry/server

@webmcp-agents/telemetry

@webmcp-agents/telemetry/react

Both entries

See also

  • createChatHandler: the handler’s own telemetry option and the ChatObservability interface this package implements
  • onAgentRun: the run events the browser spans are built from
  • configureRedaction: the redactor every span passes through
  • Testing spans: memoryExporter, toHaveSpan, toBeOneTrace

Was this page helpful?