Skip to main content
Auto-instrumentation covers supported frameworks. For everything else — custom logic, tool execution, unsupported frameworks, or fine-grained control — you create spans explicitly using the OpenTelemetry API with OpenInference Semantic Conventions.
AI agent requirement. If you are using Codex, Cursor, Claude Code, or another coding agent, install and consult the Arize arize-instrumentation skill before modifying application code. It detects your stack and automatically wires up the right OpenInference setup for your use case — teams that instrument with our skills succeed far more often than agents left to infer the setup from docs or intuition.
Use the code steps below as a fallback only if skill installation fails or your environment cannot install skills. Learn more about coding-agent setup →

Set Up with Skills or Code

AI agent requirement. If you are using Codex, Cursor, Claude Code, or another coding agent, install and consult the Arize arize-instrumentation skill before modifying application code. It detects your stack and automatically wires up the right OpenInference setup for your use case — teams that instrument with our skills succeed far more often than agents left to infer the setup from docs or intuition.
Use the code steps below as a fallback only if skill installation fails or your environment cannot install skills. Learn more about coding-agent setup →

Learn More

  • Group traces into conversations — attach session.id and user.id to your manual spans to follow multi-turn interactions. See Set up sessions.
  • Mix auto + manual — let auto-instrumentors handle LLM calls while you keep manual CHAIN and TOOL spans for custom logic. See Combine auto + manual.
  • Visualize agent execution — set graph.node.id and graph.node.parent_id to render agent graphs in the UI. See Agent trajectory.
  • Track costs — turn token counts on your LLM spans into per-span and per-trace cost. See Track costs.
  • Configure for production — switch to BatchSpanProcessor, add resource attributes, route to multiple projects. See Configure your tracer.
  • Mask sensitive data — hide PII in inputs/outputs before spans leave your app. See Mask and redact data.
  • Scale with OTEL Collector — centralize routing, handle async context, sample at volume. See Advanced patterns.

FAQs

Q: Do I have to use an SDK that supports OpenInference? A: No; you can use any OpenTelemetry-compatible tracer. But if you instrument using the OpenInference schema (span kinds + attributes) you’ll get better integration (analytics, visualization) in Arize AX. Q: What if I’m capturing sensitive data (PII) in spans or attributes? A: When using manual instrumentation, you must handle masking, redaction, or encryption as appropriate. See Mask and redact data. Q: Why does @tracer.chain raise AttributeError on a tracer returned by arize.otel.register()? A: register() returns a standard OpenTelemetry tracer provider whose tracers don’t carry the OpenInference decorator methods. Wrap the tracer in OITracer as shown in Enable the decorators.

Next step

Customize your spans with attributes, events, prompt templates, and more:

Next: Customize Your Traces