Skip to main content

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:
  1. Map attribute names from source conventions to OpenInference conventions
  2. Transform attribute values to match expected formats
  3. Preserve all data while normalizing the structure

View OpenLIT Traces in Phoenix

Convert OpenLIT traces to OpenInference format using the OpenInferenceSpanProcessor from the openinference-instrumentation-openlit package.

OpenInference OpenLit Instrumentation

View on PyPI
1

Install Required Packages

Install the necessary packages:
2

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.
3

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:
4

Initialize OpenLIT and Semantic Kernel

Initialize OpenLIT with the tracer and set up Semantic Kernel:
5

Run Query and View Traces

Invoke your model and view the converted traces in Phoenix:
The traces will be visible in the Phoenix UI at http://localhost:6006.

View OpenLLMetry Traces in Phoenix

Convert OpenLLMetry traces to OpenInference format using the OpenInferenceSpanProcessor from the openinference-instrumentation-openllmetry package.

OpenInference OpenLLMetry Instrumentation

View on PyPI
1

Install Required Packages

Install the necessary packages:
2

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.)
3

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:
4

Initialize OpenAI Instrumentor for OpenLLMetry

Initialize the OpenAI instrumentor with the tracer provider to generate OpenLLMetry traces:
5

Run Query and View Traces

Invoke your model and view the converted traces in Phoenix:
The traces will be visible in the Phoenix UI at 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:
  1. Creates a custom TraceExporter that converts OpenTelemetry GenAI spans to OpenInference spans
  2. Uses the custom exporter in a SpanProcessor
  3. Exports traces to Phoenix

OpenInference GenAI Package

View on npm
1

Install Required Packages

Install the necessary packages:
2

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.
3

Create Custom TraceExporter

Create a custom TraceExporter file (e.g., openinferenceOTLPTraceExporter.ts) that converts the OpenTelemetry GenAI attributes to OpenInference attributes:
4

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):
5

View Traces in Phoenix

Once your application is running and generating traces, the converted OpenTelemetry GenAI traces will be visible in the Phoenix UI. The custom exporter automatically converts GenAI span attributes to OpenInference format before exporting to 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.
1

Install Required Packages

2

Configure the Tracer Provider

Point an OTLP/HTTP exporter at Phoenix. For Phoenix Cloud, set PHOENIX_COLLECTOR_ENDPOINT and PHOENIX_API_KEY.
3

Emit a GenAI-Convention Span

Wrap each LLM call in a span and set the canonical gen_ai.* attributes using OpenTelemetry semantic-convention helpers where available.
For a worked end-to-end example using google.golang.org/genai, see Gemini Go SDK.

Learn More