You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/gen-ai/aws-bedrock.md
+58-30Lines changed: 58 additions & 30 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -6,12 +6,33 @@ linkTitle: AWS Bedrock
6
6
7
7
**Status**: [Development][DocumentStatus]
8
8
9
+
> [!Warning]
10
+
>
11
+
> Existing GenAI instrumentations that are using
12
+
> [v1.36.0 of this document](https://github.com/open-telemetry/semantic-conventions/blob/v1.36.0/docs/gen-ai/README.md)
13
+
> (or prior):
14
+
>
15
+
> * SHOULD NOT change the version of the GenAI conventions that they emit by default.
16
+
> Conventions include, but are not limited to, attributes, metric, span and event names,
17
+
> span kind and unit of measure.
18
+
> * SHOULD introduce an environment variable `OTEL_SEMCONV_STABILITY_OPT_IN`
19
+
> as a comma-separated list of category-specific values. The list of values
20
+
> includes:
21
+
> *`gen_ai_latest_experimental` - emit the latest experimental version of
22
+
> GenAI conventions (supported by the instrumentation) and do not emit the
23
+
> old one (v1.36.0 or prior).
24
+
> * The default behavior is to continue emitting whatever version of the GenAI
25
+
> conventions the instrumentation was emitting (1.34.0 or prior).
26
+
>
27
+
> This transition plan will be updated to include stable version before the
28
+
> GenAI conventions are marked as stable.
29
+
30
+
## AWS Bedrock Spans
31
+
9
32
The Semantic Conventions for [AWS Bedrock](https://aws.amazon.com/bedrock/) extend and override the semantic conventions
10
33
for [Gen AI Spans](gen-ai-spans.md).
11
34
12
-
`gen_ai.system` MUST be set to `"aws.bedrock"`.
13
-
14
-
## AWS Bedrock Spans
35
+
`gen_ai.provider.name` MUST be set to `"aws.bedrock"`.
15
36
16
37
These attributes track input data and metadata for a request to an AWS Bedrock model. The attributes include general Generative AI
17
38
attributes and ones specific the AWS Bedrock.
@@ -35,7 +56,7 @@ Describes an AWS Bedrock operation span.
35
56
|---|---|---|---|---|---|
36
57
|[`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`||
37
58
|[`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`||
38
-
|[`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`||
59
+
|[`gen_ai.provider.name`](/docs/registry/attributes/gen-ai.md)| string | The Generative AI provider as identified by the client or server instrumentation. [2]|`openai`; `gcp.gen_ai`; `gcp.vertex_ai`|`Required`||
39
60
|[`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 ||
40
61
|[`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 ||
41
62
|[`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]||
@@ -60,17 +81,24 @@ Describes an AWS Bedrock operation span.
60
81
61
82
**[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.
62
83
63
-
**[2]`gen_ai.system`:** The `gen_ai.system` describes a family of GenAI models with specific model identified
64
-
by `gen_ai.request.model` and `gen_ai.response.model` attributes.
84
+
**[2]`gen_ai.provider.name`:** The attribute SHOULD be set based on the instrumentation's best
85
+
knowledge and may differ from the actual model provider.
86
+
87
+
Multiple providers, including Azure OpenAI, Gemini, and AI hosting platforms
88
+
are accessible using the OpenAI REST API and corresponding client libraries,
89
+
but may proxy or host models from different providers.
65
90
66
-
The actual GenAI product may differ from the one identified by the client.
67
-
Multiple systems, including Azure OpenAI and Gemini, are accessible by OpenAI client
68
-
libraries. In such cases, the `gen_ai.system` is set to `openai` based on the
69
-
instrumentation's best knowledge, instead of the actual system. The `server.address`
70
-
attribute may help identify the actual system in use for `openai`.
91
+
The `gen_ai.request.model`, `gen_ai.response.model`, and `server.address`
92
+
attributes may help identify the actual system in use.
71
93
72
-
For custom model, a custom friendly name SHOULD be used.
73
-
If none of these options apply, the `gen_ai.system` SHOULD be set to `_OTHER`.
94
+
The `gen_ai.provider.name` attribute acts as a discriminator that
95
+
identifies the GenAI telemetry format flavor specific to that provider
96
+
within GenAI semantic conventions.
97
+
It SHOULD be set consistently with provider-specific attributes and signals.
98
+
For example, GenAI spans, metrics, and events related to AWS Bedrock
99
+
should have the `gen_ai.provider.name` set to `aws.bedrock` and include
100
+
applicable `aws.bedrock.*` attributes and are not expected to include
101
+
`openai.*` attributes.
74
102
75
103
**[3]`error.type`:** The `error.type` SHOULD match the error code returned by the Generative AI provider or the client library,
76
104
the canonical name of exception that occurred, or another low-cardinality error identifier.
@@ -139,31 +167,31 @@ Additional output format details may be recorded in the future in the `gen_ai.ou
139
167
140
168
---
141
169
142
-
`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.
170
+
`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.
**[11]:**This refers to the 'generativelanguage.googleapis.com' endpoint. Also known as the AI Studio API. May use common attributes prefixed with 'gcp.gen_ai.'.
190
+
**[11]:**Used when accessing the 'generativelanguage.googleapis.com' endpoint. Also known as the AI Studio API.
163
191
164
-
**[12]:** May be used when specific backend is unknown. May use common attributes prefixed with 'gcp.gen_ai.'.
192
+
**[12]:** May be used when specific backend is unknown.
165
193
166
-
**[13]:**This refers to the 'aiplatform.googleapis.com' endpoint. May use common attributes prefixed with 'gcp.gen_ai.'.
194
+
**[13]:**Used when accessing the 'aiplatform.googleapis.com' endpoint.
Copy file name to clipboardExpand all lines: docs/gen-ai/azure-ai-inference.md
+34-2Lines changed: 34 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -6,13 +6,45 @@ linkTitle: Azure AI Inference
6
6
7
7
**Status**: [Development][DocumentStatus]
8
8
9
+
<!-- toc -->
10
+
11
+
-[Spans](#spans)
12
+
-[Inference](#inference)
13
+
-[Embedding](#embedding)
14
+
-[Metrics](#metrics)
15
+
16
+
<!-- tocstop -->
17
+
18
+
> [!Warning]
19
+
>
20
+
> Existing GenAI instrumentations that are using
21
+
> [v1.36.0 of this document](https://github.com/open-telemetry/semantic-conventions/blob/v1.36.0/docs/gen-ai/README.md)
22
+
> (or prior):
23
+
>
24
+
> * SHOULD NOT change the version of the GenAI conventions that they emit by default.
25
+
> Conventions include, but are not limited to, attributes, metric, span and event names,
26
+
> span kind and unit of measure.
27
+
> * SHOULD introduce an environment variable `OTEL_SEMCONV_STABILITY_OPT_IN`
28
+
> as a comma-separated list of category-specific values. The list of values
29
+
> includes:
30
+
> *`gen_ai_latest_experimental` - emit the latest experimental version of
31
+
> GenAI conventions (supported by the instrumentation) and do not emit the
32
+
> old one (v1.36.0 or prior).
33
+
> * The default behavior is to continue emitting whatever version of the GenAI
34
+
> conventions the instrumentation was emitting (1.36.0 or prior).
35
+
>
36
+
> This transition plan will be updated to include stable version before the
37
+
> GenAI conventions are marked as stable.
38
+
9
39
The Semantic Conventions for [Azure AI Inference](https://learn.microsoft.com/azure/ai-studio) extend and override the [GenAI Semantic Conventions](README.md).
`gen_ai.provider.name` MUST be set to `"azure.ai.inference"` and SHOULD be provided **at span creation time**.
46
+
47
+
<!-- semconv span.azure.ai.inference.client -->
16
48
<!-- NOTE: THIS TEXT IS AUTOGENERATED. DO NOT EDIT BY HAND. -->
17
49
<!-- see templates/registry/markdown/snippet.md.j2 -->
18
50
<!-- prettier-ignore-start -->
@@ -23,7 +55,7 @@ The Semantic Conventions for [Azure AI Inference](https://learn.microsoft.com/az
23
55
24
56
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).
25
57
26
-
`gen_ai.system` MUST be set to `"az.ai.inference"` and SHOULD be provided **at span creation time**.
58
+
`gen_ai.provider.name` MUST be set to `"azure.ai.inference"` and SHOULD be provided **at span creation time**.
27
59
28
60
**Span name** SHOULD be `{gen_ai.operation.name} {gen_ai.request.model}` when the
29
61
model name is available and `{gen_ai.operation.name}` otherwise.
0 commit comments