Skip to content
Merged
Show file tree
Hide file tree
Changes from 5 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions .chloggen/gen-ai-system-naming.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
change_type: breaking
component: gen-ai
note: |
Follow system-specific naming policy in GenAI semantic conventions.
- Rename `gen_ai.system` to `gen_ai.provider.name`
- Remove `gen_ai` prefix from `gen_ai.openai.*` attributes.
- Rename `az.ai.*` attribute names to `azure.ai.*`.

issues: [ 2046 ]
subtext:
1 change: 1 addition & 0 deletions .github/ISSUE_TEMPLATE/bug_report.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@ body:
- area:network
- area:nodejs
- area:oci
- area:openai
- area:opentracing
- area:os
- area:otel
Expand Down
1 change: 1 addition & 0 deletions .github/ISSUE_TEMPLATE/change_proposal.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ body:
- area:network
- area:nodejs
- area:oci
- area:openai
- area:opentracing
- area:os
- area:otel
Expand Down
16 changes: 8 additions & 8 deletions docs/gen-ai/aws-bedrock.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ linkTitle: AWS Bedrock
The Semantic Conventions for [AWS Bedrock](https://aws.amazon.com/bedrock/) extend and override the semantic conventions
for [Gen AI Spans](gen-ai-spans.md).

`gen_ai.system` MUST be set to `"aws.bedrock"`.
`gen_ai.provider.name` MUST be set to `"aws.bedrock"`.

## AWS Bedrock Spans

Expand All @@ -35,7 +35,7 @@ Describes an AWS Bedrock operation span.
|---|---|---|---|---|---|
| [`aws.bedrock.guardrail.id`](/docs/registry/attributes/aws.md) | string | The unique identifier of the AWS Bedrock Guardrail. A [guardrail](https://docs.aws.amazon.com/bedrock/latest/userguide/guardrails.html) helps safeguard and prevent unwanted behavior from model responses or user messages. | `sgi5gkybzqak` | `Required` | ![Development](https://img.shields.io/badge/-development-blue) |
| [`gen_ai.operation.name`](/docs/registry/attributes/gen-ai.md) | string | The name of the operation being performed. [1] | `chat`; `generate_content`; `text_completion` | `Required` | ![Development](https://img.shields.io/badge/-development-blue) |
| [`gen_ai.system`](/docs/registry/attributes/gen-ai.md) | string | The Generative AI product as identified by the client or server instrumentation. [2] | `openai` | `Required` | ![Development](https://img.shields.io/badge/-development-blue) |
| [`gen_ai.provider.name`](/docs/registry/attributes/gen-ai.md) | string | The Generative AI product as identified by the client or server instrumentation. [2] | `openai`; `gcp.gen_ai`; `gcp.vertex_ai` | `Required` | ![Development](https://img.shields.io/badge/-development-blue) |
| [`error.type`](/docs/registry/attributes/error.md) | string | Describes a class of error the operation ended with. [3] | `timeout`; `java.net.UnknownHostException`; `server_certificate_invalid`; `500` | `Conditionally Required` if the operation ended in an error | ![Stable](https://img.shields.io/badge/-stable-lightgreen) |
| [`gen_ai.conversation.id`](/docs/registry/attributes/gen-ai.md) | string | The unique identifier for a conversation (session, thread), used to store and correlate messages within this conversation. [4] | `conv_5j66UpCpwteGg4YSxUnt7lPY` | `Conditionally Required` when available | ![Development](https://img.shields.io/badge/-development-blue) |
| [`gen_ai.output.type`](/docs/registry/attributes/gen-ai.md) | string | Represents the content type requested by the client. [5] | `text`; `json`; `image` | `Conditionally Required` [6] | ![Development](https://img.shields.io/badge/-development-blue) |
Expand All @@ -60,17 +60,17 @@ Describes an AWS Bedrock operation span.

**[1] `gen_ai.operation.name`:** If one of the predefined values applies, but specific system uses a different name it's RECOMMENDED to document it in the semantic conventions for specific GenAI system and use system-specific name in the instrumentation. If a different name is not documented, instrumentation libraries SHOULD use applicable predefined value.

**[2] `gen_ai.system`:** The `gen_ai.system` describes a family of GenAI models with specific model identified
**[2] `gen_ai.provider.name`:** This attribute describes a family of GenAI models with specific model identified
by `gen_ai.request.model` and `gen_ai.response.model` attributes.

The actual GenAI product may differ from the one identified by the client.
Multiple systems, including Azure OpenAI and Gemini, are accessible by OpenAI client
libraries. In such cases, the `gen_ai.system` is set to `openai` based on the
libraries. In such cases, the `gen_ai.provider.name` is set to `openai` based on the
instrumentation's best knowledge, instead of the actual system. The `server.address`
attribute may help identify the actual system in use for `openai`.

For custom model, a custom friendly name SHOULD be used.
If none of these options apply, the `gen_ai.system` SHOULD be set to `_OTHER`.
If none of these options apply, the `gen_ai.provider.name` SHOULD be set to `_OTHER`.

**[3] `error.type`:** The `error.type` SHOULD match the error code returned by the Generative AI provider or the client library,
the canonical name of exception that occurred, or another low-cardinality error identifier.
Expand Down Expand Up @@ -139,14 +139,14 @@ Additional output format details may be recorded in the future in the `gen_ai.ou

---

`gen_ai.system` has the following list of well-known values. If one of them applies, then the respective value MUST be used; otherwise, a custom value MAY be used.
`gen_ai.provider.name` has the following list of well-known values. If one of them applies, then the respective value MUST be used; otherwise, a custom value MAY be used.
Comment thread
lmolkova marked this conversation as resolved.

| Value | Description | Stability |
|---|---|---|
| `anthropic` | Anthropic | ![Development](https://img.shields.io/badge/-development-blue) |
| `aws.bedrock` | AWS Bedrock | ![Development](https://img.shields.io/badge/-development-blue) |
| `az.ai.inference` | Azure AI Inference | ![Development](https://img.shields.io/badge/-development-blue) |
| `az.ai.openai` | Azure OpenAI | ![Development](https://img.shields.io/badge/-development-blue) |
| `azure.ai.inference` | Azure AI Inference | ![Development](https://img.shields.io/badge/-development-blue) |
| `azure.ai.openai` | Azure OpenAI | ![Development](https://img.shields.io/badge/-development-blue) |
| `cohere` | Cohere | ![Development](https://img.shields.io/badge/-development-blue) |
| `deepseek` | DeepSeek | ![Development](https://img.shields.io/badge/-development-blue) |
| `gcp.gemini` | Gemini [11] | ![Development](https://img.shields.io/badge/-development-blue) |
Expand Down
6 changes: 4 additions & 2 deletions docs/gen-ai/azure-ai-inference.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,9 @@ The Semantic Conventions for [Azure AI Inference](https://learn.microsoft.com/az

### Inference

<!-- semconv span.gen_ai.az.ai.inference.client -->
`gen_ai.provider.name` MUST be set to `"azure.ai.inference"` and SHOULD be provided **at span creation time**.

<!-- semconv span.azure.ai.inference.client -->
<!-- NOTE: THIS TEXT IS AUTOGENERATED. DO NOT EDIT BY HAND. -->
<!-- see templates/registry/markdown/snippet.md.j2 -->
<!-- prettier-ignore-start -->
Expand All @@ -23,7 +25,7 @@ The Semantic Conventions for [Azure AI Inference](https://learn.microsoft.com/az

Semantic Conventions for [Azure AI Inference](https://learn.microsoft.com/azure/ai-studio/reference/reference-model-inference-api) client spans extend and override the semantic conventions for [Gen AI Spans](gen-ai-spans.md).

`gen_ai.system` MUST be set to `"az.ai.inference"` and SHOULD be provided **at span creation time**.
`gen_ai.provide.name` MUST be set to `"azure.ai.inference"` and SHOULD be provided **at span creation time**.

**Span name** SHOULD be `{gen_ai.operation.name} {gen_ai.request.model}` when the
model name is available and `{gen_ai.operation.name}` otherwise.
Expand Down
36 changes: 18 additions & 18 deletions docs/gen-ai/gen-ai-agent-spans.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ linkTitle: Agent spans

- [Spans](#spans)
- [Create agent span](#create-agent-span)
- [Invoke Agent Span](#invoke-agent-span)
- [Agent execute tool span](#agent-execute-tool-span)
- [Invoke agent span](#invoke-agent-span)
- [Execute tool span](#execute-tool-span)

<!-- tocstop -->

Expand Down Expand Up @@ -52,7 +52,7 @@ Semantic conventions for individual GenAI systems and frameworks MAY specify dif
| Attribute | Type | Description | Examples | [Requirement Level](https://opentelemetry.io/docs/specs/semconv/general/attribute-requirement-level/) | Stability |
|---|---|---|---|---|---|
| [`gen_ai.operation.name`](/docs/registry/attributes/gen-ai.md) | string | The name of the operation being performed. [1] | `chat`; `generate_content`; `text_completion` | `Required` | ![Development](https://img.shields.io/badge/-development-blue) |
| [`gen_ai.system`](/docs/registry/attributes/gen-ai.md) | string | The Generative AI product as identified by the client or server instrumentation. [2] | `openai` | `Required` | ![Development](https://img.shields.io/badge/-development-blue) |
| [`gen_ai.provider.name`](/docs/registry/attributes/gen-ai.md) | string | The Generative AI product as identified by the client or server instrumentation. [2] | `openai`; `gcp.gen_ai`; `gcp.vertex_ai` | `Required` | ![Development](https://img.shields.io/badge/-development-blue) |
| [`error.type`](/docs/registry/attributes/error.md) | string | Describes a class of error the operation ended with. [3] | `timeout`; `java.net.UnknownHostException`; `server_certificate_invalid`; `500` | `Conditionally Required` if the operation ended in an error | ![Stable](https://img.shields.io/badge/-stable-lightgreen) |
| [`gen_ai.agent.description`](/docs/registry/attributes/gen-ai.md) | string | Free-form description of the GenAI agent provided by the application. | `Helps with math problems`; `Generates fiction stories` | `Conditionally Required` If provided by the application. | ![Development](https://img.shields.io/badge/-development-blue) |
| [`gen_ai.agent.id`](/docs/registry/attributes/gen-ai.md) | string | The unique identifier of the GenAI agent. | `asst_5j66UpCpwteGg4YSxUnt7lPY` | `Conditionally Required` if applicable. | ![Development](https://img.shields.io/badge/-development-blue) |
Expand All @@ -63,17 +63,17 @@ Semantic conventions for individual GenAI systems and frameworks MAY specify dif

**[1] `gen_ai.operation.name`:** If one of the predefined values applies, but specific system uses a different name it's RECOMMENDED to document it in the semantic conventions for specific GenAI system and use system-specific name in the instrumentation. If a different name is not documented, instrumentation libraries SHOULD use applicable predefined value.

**[2] `gen_ai.system`:** The `gen_ai.system` describes a family of GenAI models with specific model identified
**[2] `gen_ai.provider.name`:** This attribute describes a family of GenAI models with specific model identified
by `gen_ai.request.model` and `gen_ai.response.model` attributes.

The actual GenAI product may differ from the one identified by the client.
Multiple systems, including Azure OpenAI and Gemini, are accessible by OpenAI client
libraries. In such cases, the `gen_ai.system` is set to `openai` based on the
libraries. In such cases, the `gen_ai.provider.name` is set to `openai` based on the
instrumentation's best knowledge, instead of the actual system. The `server.address`
attribute may help identify the actual system in use for `openai`.

For custom model, a custom friendly name SHOULD be used.
If none of these options apply, the `gen_ai.system` SHOULD be set to `_OTHER`.
If none of these options apply, the `gen_ai.provider.name` SHOULD be set to `_OTHER`.

**[3] `error.type`:** The `error.type` SHOULD match the error code returned by the Generative AI provider or the client library,
the canonical name of exception that occurred, or another low-cardinality error identifier.
Expand Down Expand Up @@ -109,14 +109,14 @@ Instrumentations SHOULD document the list of errors they report.

---

`gen_ai.system` has the following list of well-known values. If one of them applies, then the respective value MUST be used; otherwise, a custom value MAY be used.
`gen_ai.provider.name` has the following list of well-known values. If one of them applies, then the respective value MUST be used; otherwise, a custom value MAY be used.

| Value | Description | Stability |
|---|---|---|
| `anthropic` | Anthropic | ![Development](https://img.shields.io/badge/-development-blue) |
| `aws.bedrock` | AWS Bedrock | ![Development](https://img.shields.io/badge/-development-blue) |
| `az.ai.inference` | Azure AI Inference | ![Development](https://img.shields.io/badge/-development-blue) |
| `az.ai.openai` | Azure OpenAI | ![Development](https://img.shields.io/badge/-development-blue) |
| `azure.ai.inference` | Azure AI Inference | ![Development](https://img.shields.io/badge/-development-blue) |
| `azure.ai.openai` | Azure OpenAI | ![Development](https://img.shields.io/badge/-development-blue) |
| `cohere` | Cohere | ![Development](https://img.shields.io/badge/-development-blue) |
| `deepseek` | DeepSeek | ![Development](https://img.shields.io/badge/-development-blue) |
| `gcp.gemini` | Gemini [7] | ![Development](https://img.shields.io/badge/-development-blue) |
Expand All @@ -140,7 +140,7 @@ Instrumentations SHOULD document the list of errors they report.
<!-- END AUTOGENERATED TEXT -->
<!-- endsemconv -->

### Invoke Agent Span
### Invoke agent span

<!-- semconv span.gen_ai.invoke_agent.client -->
<!-- NOTE: THIS TEXT IS AUTOGENERATED. DO NOT EDIT BY HAND. -->
Expand All @@ -165,7 +165,7 @@ Semantic conventions for individual GenAI systems and frameworks MAY specify dif
| Attribute | Type | Description | Examples | [Requirement Level](https://opentelemetry.io/docs/specs/semconv/general/attribute-requirement-level/) | Stability |
|---|---|---|---|---|---|
| [`gen_ai.operation.name`](/docs/registry/attributes/gen-ai.md) | string | The name of the operation being performed. [1] | `chat`; `generate_content`; `text_completion` | `Required` | ![Development](https://img.shields.io/badge/-development-blue) |
| [`gen_ai.system`](/docs/registry/attributes/gen-ai.md) | string | The Generative AI product as identified by the client or server instrumentation. [2] | `openai` | `Required` | ![Development](https://img.shields.io/badge/-development-blue) |
| [`gen_ai.provider.name`](/docs/registry/attributes/gen-ai.md) | string | The Generative AI product as identified by the client or server instrumentation. [2] | `openai`; `gcp.gen_ai`; `gcp.vertex_ai` | `Required` | ![Development](https://img.shields.io/badge/-development-blue) |
| [`error.type`](/docs/registry/attributes/error.md) | string | Describes a class of error the operation ended with. [3] | `timeout`; `java.net.UnknownHostException`; `server_certificate_invalid`; `500` | `Conditionally Required` if the operation ended in an error | ![Stable](https://img.shields.io/badge/-stable-lightgreen) |
| [`gen_ai.agent.description`](/docs/registry/attributes/gen-ai.md) | string | Free-form description of the GenAI agent provided by the application. | `Helps with math problems`; `Generates fiction stories` | `Conditionally Required` when available | ![Development](https://img.shields.io/badge/-development-blue) |
| [`gen_ai.agent.id`](/docs/registry/attributes/gen-ai.md) | string | The unique identifier of the GenAI agent. | `asst_5j66UpCpwteGg4YSxUnt7lPY` | `Conditionally Required` if applicable. | ![Development](https://img.shields.io/badge/-development-blue) |
Expand All @@ -192,17 +192,17 @@ Semantic conventions for individual GenAI systems and frameworks MAY specify dif

**[1] `gen_ai.operation.name`:** If one of the predefined values applies, but specific system uses a different name it's RECOMMENDED to document it in the semantic conventions for specific GenAI system and use system-specific name in the instrumentation. If a different name is not documented, instrumentation libraries SHOULD use applicable predefined value.

**[2] `gen_ai.system`:** The `gen_ai.system` describes a family of GenAI models with specific model identified
**[2] `gen_ai.provider.name`:** This attribute describes a family of GenAI models with specific model identified
by `gen_ai.request.model` and `gen_ai.response.model` attributes.

The actual GenAI product may differ from the one identified by the client.
Multiple systems, including Azure OpenAI and Gemini, are accessible by OpenAI client
libraries. In such cases, the `gen_ai.system` is set to `openai` based on the
libraries. In such cases, the `gen_ai.provider.name` is set to `openai` based on the
instrumentation's best knowledge, instead of the actual system. The `server.address`
attribute may help identify the actual system in use for `openai`.

For custom model, a custom friendly name SHOULD be used.
If none of these options apply, the `gen_ai.system` SHOULD be set to `_OTHER`.
If none of these options apply, the `gen_ai.provider.name` SHOULD be set to `_OTHER`.

**[3] `error.type`:** The `error.type` SHOULD match the error code returned by the Generative AI provider or the client library,
the canonical name of exception that occurred, or another low-cardinality error identifier.
Expand Down Expand Up @@ -273,14 +273,14 @@ Additional output format details may be recorded in the future in the `gen_ai.ou

---

`gen_ai.system` has the following list of well-known values. If one of them applies, then the respective value MUST be used; otherwise, a custom value MAY be used.
`gen_ai.provider.name` has the following list of well-known values. If one of them applies, then the respective value MUST be used; otherwise, a custom value MAY be used.

| Value | Description | Stability |
|---|---|---|
| `anthropic` | Anthropic | ![Development](https://img.shields.io/badge/-development-blue) |
| `aws.bedrock` | AWS Bedrock | ![Development](https://img.shields.io/badge/-development-blue) |
| `az.ai.inference` | Azure AI Inference | ![Development](https://img.shields.io/badge/-development-blue) |
| `az.ai.openai` | Azure OpenAI | ![Development](https://img.shields.io/badge/-development-blue) |
| `azure.ai.inference` | Azure AI Inference | ![Development](https://img.shields.io/badge/-development-blue) |
| `azure.ai.openai` | Azure OpenAI | ![Development](https://img.shields.io/badge/-development-blue) |
| `cohere` | Cohere | ![Development](https://img.shields.io/badge/-development-blue) |
| `deepseek` | DeepSeek | ![Development](https://img.shields.io/badge/-development-blue) |
| `gcp.gemini` | Gemini [12] | ![Development](https://img.shields.io/badge/-development-blue) |
Expand All @@ -304,7 +304,7 @@ Additional output format details may be recorded in the future in the `gen_ai.ou
<!-- END AUTOGENERATED TEXT -->
<!-- endsemconv -->

## Agent execute tool span
## Execute tool span

If you are using some tools in your agent, refer to [Execute Tool Span](./gen-ai-spans.md#execute-tool-span).

Expand Down
Loading
Loading