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
Install Required Packages
Start Phoenix
http://localhost:6006. You can visit the app via a browser at the same address.Set Up Tracer Provider and Span Processors
OpenInferenceSpanProcessor converts OpenLIT traces to OpenInference format, and the BatchSpanProcessor exports them to Phoenix via the OTLP gRPC endpoint:Initialize OpenLIT and Semantic Kernel
Run Query and View Traces
http://localhost:6006.View OpenLLMetry Traces in Phoenix
Convert OpenLLMetry traces to OpenInference format using theOpenInferenceSpanProcessor from the openinference-instrumentation-openllmetry package.
OpenInference OpenLLMetry Instrumentation
Install Required Packages
Start Phoenix
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
OpenInferenceSpanProcessor converts OpenLLMetry traces to OpenInference format, and the BatchSpanProcessor exports them to Phoenix via the OTLP gRPC endpoint:Initialize OpenAI Instrumentor for OpenLLMetry
Run Query and View Traces
http://localhost:6006.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
Install Required Packages
Start Phoenix
http://localhost:6006. You can visit the app via a browser at the same address.Create Custom TraceExporter
openinferenceOTLPTraceExporter.ts) that converts the OpenTelemetry GenAI attributes to OpenInference attributes:Set Up Tracer Provider with Span Processor
COLLECTOR_ENDPOINT environment variable to your Phoenix endpoint (e.g., http://localhost:6006 for local Phoenix):View Traces in 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.
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.Install Required Packages
Configure the Tracer Provider
PHOENIX_COLLECTOR_ENDPOINT and PHOENIX_API_KEY.Emit a GenAI-Convention Span
gen_ai.* attributes using OpenTelemetry semantic-convention helpers where available.google.golang.org/genai, see Gemini Go SDK.
