Environment variables
- TypeScript
- Python
Install dependencies
- TypeScript
- Python
Register OpenTelemetry once at startup
- TypeScript
- Python
Call
registerOTel() before code that creates spans.Create a run
- TypeScript
- Python
A run is one top-level See Wrapping your agent for
wrapAgent execution. Return the wrapped function result and runId so you can attach external signals later.threadId / isExperiment on the wrapped function.What is captured automatically vs manually
Understanding this boundary prevents the most common “data is missing” issues.- TypeScript
- Python
Runs capture input, output, timing, and errors on the root span. Per-LLM-call detail requires OpenInference or manual
llm.step spans. Tool arguments and results require manual tool.call spans. Business metadata is never automatic—set attributes on the run span.Optional: add OpenInference instrumentors
Use this when you want provider-generated LLM spans to appear as run children.- TypeScript
- Python

