Why Translation is Needed
Semantic conventions are standardized attribute names and values that ensure consistent tracing across different LLM providers, models, and frameworks. Different instrumentation standards use different semantic conventions to describe LLM operations. Phoenix uses OpenInference semantic conventions as its standard format. To ensure all traces are displayed consistently in Phoenix, traces from other libraries must be translated to the OpenInference format using span processors.How Translation Works - Span Processors
Span processors are components that process spans before they are exported, allowing them to be modified, filtered, or transformed. These processors:- Map attribute names from source conventions to OpenInference conventions
- Transform attribute values to match expected formats
- Preserve all data while normalizing the structure
View OpenLIT Traces in Phoenix
Convert OpenLIT traces to OpenInference format using theOpenInferenceSpanProcessor from the openinference-instrumentation-openlit package.
OpenInference OpenLit Instrumentation
View on PyPI
Start Phoenix
Start Phoenix in the background as a collector. By default, it listens on
http://localhost:6006. You can visit the app via a browser at the same address.Set Up Tracer Provider and Span Processors
Configure the tracer provider and add the span processors. The
OpenInferenceSpanProcessor converts OpenLIT traces to OpenInference format, and the BatchSpanProcessor exports them to Phoenix via the OTLP gRPC endpoint:Initialize OpenLIT and Semantic Kernel
Initialize OpenLIT with the tracer and set up Semantic Kernel:
View OpenLLMetry Traces in Phoenix
Convert OpenLLMetry traces to OpenInference format using theOpenInferenceSpanProcessor from the openinference-instrumentation-openllmetry package.
OpenInference OpenLLMetry Instrumentation
View on PyPI
Start Phoenix
Start Phoenix in the background as a collector. By default, it listens on
http://localhost:6006. You can visit the app via a browser at the same address. (Phoenix does not send data over the internet. It only operates locally on your machine.)Set Up Tracer Provider and Span Processors
Configure the tracer provider and add the span processors. The
OpenInferenceSpanProcessor converts OpenLLMetry traces to OpenInference format, and the BatchSpanProcessor exports them to Phoenix via the OTLP gRPC endpoint:Initialize OpenAI Instrumentor for OpenLLMetry
Initialize the OpenAI instrumentor with the tracer provider to generate OpenLLMetry traces:
View OpenTelemetry GenAI Traces in Phoenix
Convert OpenTelemetry GenAI span attributes to OpenInference format using the@arizeai/openinference-genai package for TypeScript/JavaScript applications.
This example:
- Creates a custom TraceExporter that converts OpenTelemetry GenAI spans to OpenInference spans
- Uses the custom exporter in a SpanProcessor
- Exports traces to Phoenix
OpenInference GenAI Package
View on npm
Start Phoenix
Start Phoenix in the background as a collector. By default, it listens on
http://localhost:6006. You can visit the app via a browser at the same address.Create Custom TraceExporter
Create a custom TraceExporter file (e.g.,
openinferenceOTLPTraceExporter.ts) that converts the OpenTelemetry GenAI attributes to OpenInference attributes:Set Up Tracer Provider with Span Processor
Use the custom exporter in a SpanProcessor and configure the tracer provider. Set the
COLLECTOR_ENDPOINT environment variable to your Phoenix endpoint (e.g., http://localhost:6006 for local Phoenix):View OpenTelemetry GenAI Traces from Go in Phoenix
There is no Go equivalent of@arizeai/openinference-genai today, so the Go flow does not convert GenAI attributes to OpenInference in-process. Instead, emit GenAI-convention spans directly with the standard OpenTelemetry Go SDK; Phoenix ingests them as-is.
Spans emitted this way do not carry
openinference.span.kind or structured llm.input_messages.* / llm.output_messages.* indexing. They appear in Phoenix and remain queryable by gen_ai.* attributes, but Phoenix UI features that key off OpenInference attributes will be reduced. For Go SDKs with dedicated OpenInference instrumentation (OpenAI, Anthropic), prefer those instead.Configure the Tracer Provider
Point an OTLP/HTTP exporter at Phoenix. For Phoenix Cloud, set
PHOENIX_COLLECTOR_ENDPOINT and PHOENIX_API_KEY.Emit a GenAI-Convention Span
Wrap each LLM call in a span and set the canonical For a worked end-to-end example using
gen_ai.* attributes using OpenTelemetry semantic-convention helpers where available.google.golang.org/genai, see Gemini Go SDK.
