Semantic Conventions for Generative AI
Spring AI provides built-in instrumentation for models, tools, and agentic workflows based on the Micrometer APIs. Arconia lets you export that telemetry following the semantic conventions your observability backend understands. There are two families of conventions to choose from, each provided by its own module.
The OpenTelemetry Semantic Conventions for Generative AI are the standard defined by OpenTelemetry. Several platforms build on them, adding attributes of their own, and Arconia supports them as flavors of the same module: the default opentelemetry flavor, and the OpenLIT, OpenLLMetry, LangSmith, and Langfuse ones. You choose the flavor with a configuration property.
The OpenInference Semantic Conventions are a separate specification, defined by Arize for the Arize Phoenix and Arize AX platforms. They don’t build on the OpenTelemetry ones, and they are provided by a separate module.
Only one set of conventions for generative AI can be active in an application, since two would describe the same observations differently. Arconia fails at startup if more than one module is active.
Choosing the Conventions
Choose the conventions that your backend understands:
| Backend | Conventions |
|---|---|
Grafana LGTM, and any backend following the OpenTelemetry Semantic Conventions |
OpenTelemetry, with the default |
OpenInference. Phoenix also accepts the OpenTelemetry conventions, converting them to OpenInference when it receives them (see below). |
|
OpenLIT flavor |
|
OpenLLMetry flavor |
|
LangSmith flavor |
|
Langfuse flavor |
The conventions also differ in what they capture by default. The OpenTelemetry Semantic Conventions make the content of model calls and tool executions opt-in, while the vendor flavors and OpenInference capture it by default, as their reference implementations do.
Arize Phoenix with the OpenTelemetry Conventions
Arize Phoenix converts the OpenTelemetry attributes it receives to OpenInference ones, so the telemetry of the opentelemetry flavor is displayed as model calls, embeddings, tool executions, and agents, grouped into sessions by the conversation ID of the chat memory. A few differences remain compared with the OpenInference module:
-
Advisors are not given a span kind, since the OpenTelemetry conventions don’t define one for them. The OpenInference module records them as chains or guardrails.
-
Content is captured only when you turn it on, and Phoenix reads it only from span attributes, so include
span-attributesin thecapture-contentproperty. -
The conversion follows the version of the OpenTelemetry Semantic Conventions supported by your Phoenix version, so attributes added in later versions may not be converted.
Prefer the OpenInference module for the full Phoenix experience, and the OpenTelemetry conventions when the same telemetry also goes to other backends.