ai.* spans natively. Wire an OTel exporter pointing at Agnost, then enable telemetry per call with userId / sessionId.
1. Install
Already have@opentelemetry/sdk-node (or another OTel SDK) and @opentelemetry/exporter-trace-otlp-proto? Skip: you only need the existing packages.
No OTel set up yet?
2. Wire the OTel exporter pointing at Agnost
Already exporting OTel? Append Agnost as an additional span processor on your existing TracerProvider:instrumentation.ts):
3. Pass userId / sessionId per call
experimental_telemetry.isEnabled defaults to false: set it per call.
