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/azure-ai-inference.md
+1-1
Original file line number
Diff line number
Diff line change
@@ -27,7 +27,7 @@ The Semantic Conventions for [Azure AI Inference](https://learn.microsoft.com/az
27
27
|[`error.type`](/docs/attributes-registry/error.md)| string | Describes a class of error the operation ended with. [2]|`timeout`; `java.net.UnknownHostException`; `server_certificate_invalid`; `500`|`Conditionally Required` if the operation ended in an error ||
28
28
|[`gen_ai.output.type`](/docs/attributes-registry/gen-ai.md)| string | Represents the content type requested by the client. [3]|`text`; `json`; `image`|`Conditionally Required`[4]||
29
29
|[`gen_ai.request.choice.count`](/docs/attributes-registry/gen-ai.md)| int | The target number of candidate completions to return. |`3`|`Conditionally Required` if available, in the request, and !=1 ||
30
-
|[`gen_ai.request.model`](/docs/attributes-registry/gen-ai.md)| string | The name of the GenAI model a request is being made to. [5]|`gpt-4`|`Conditionally Required` If provided by the application. ||
30
+
|[`gen_ai.request.model`](/docs/attributes-registry/gen-ai.md)| string | The name of the GenAI model a request is being made to. [5]|`gpt-4`|`Conditionally Required` If available. ||
31
31
|[`gen_ai.request.seed`](/docs/attributes-registry/gen-ai.md)| int | Requests with same seed value more likely to return same result. |`100`|`Conditionally Required` if applicable and if the request includes a seed ||
32
32
|[`server.port`](/docs/attributes-registry/server.md)| int | GenAI server port. [6]|`80`; `8080`; `443`|`Conditionally Required` If not default (443). ||
33
33
|[`az.namespace`](/docs/attributes-registry/azure.md)| string |[Azure Resource Provider Namespace](https://learn.microsoft.com/azure/azure-resource-manager/management/azure-services-resource-providers) as recognized by the client. [7]|`Microsoft.CognitiveServices`|`Recommended`||
Copy file name to clipboardexpand all lines: docs/gen-ai/gen-ai-agent-spans.md
+30-14
Original file line number
Diff line number
Diff line change
@@ -48,19 +48,22 @@ Semantic conventions for individual GenAI systems and frameworks MAY specify dif
48
48
|---|---|---|---|---|---|
49
49
|[`gen_ai.operation.name`](/docs/attributes-registry/gen-ai.md)| string | The name of the operation being performed. [1]|`chat`; `text_completion`; `embeddings`|`Required`||
50
50
|[`gen_ai.system`](/docs/attributes-registry/gen-ai.md)| string | The Generative AI product as identified by the client or server instrumentation. [2]|`openai`|`Required`||
51
+
|[`error.type`](/docs/attributes-registry/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 ||
51
52
|[`gen_ai.agent.description`](/docs/attributes-registry/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. ||
53
+
|[`gen_ai.agent.id`](/docs/attributes-registry/gen-ai.md)| string | The unique identifier of the GenAI agent. |`asst_5j66UpCpwteGg4YSxUnt7lPY`|`Conditionally Required` if applicable. ||
52
54
|[`gen_ai.agent.name`](/docs/attributes-registry/gen-ai.md)| string | Human-readable name of the GenAI agent provided by the application. |`Math Tutor`; `Fiction Writer`|`Conditionally Required` If provided by the application. ||
53
-
|[`gen_ai.request.model`](/docs/attributes-registry/gen-ai.md)| string | The name of the GenAI model a request is being made to. [3]|`gpt-4`|`Conditionally Required` If provided by the application. ||
55
+
|[`gen_ai.request.choice.count`](/docs/attributes-registry/gen-ai.md)| int | The target number of candidate completions to return. |`3`|`Conditionally Required` if available, in the request, and !=1 ||
56
+
|[`gen_ai.request.model`](/docs/attributes-registry/gen-ai.md)| string | The name of the GenAI model a request is being made to. [4]|`gpt-4`|`Conditionally Required` If provided by the application. ||
54
57
|[`gen_ai.request.seed`](/docs/attributes-registry/gen-ai.md)| int | Requests with same seed value more likely to return same result. |`100`|`Conditionally Required` if applicable and if the request includes a seed ||
55
-
|[`server.port`](/docs/attributes-registry/server.md)| int | GenAI server port. [4]|`80`; `8080`; `443`|`Conditionally Required` If `server.address` is set. ||
56
-
|[`gen_ai.request.encoding_formats`](/docs/attributes-registry/gen-ai.md)| string[]| The encoding formats requested in an embeddings operation, if specified. [5]|`["base64"]`; `["float", "binary"]`|`Recommended`||
58
+
|[`gen_ai.request.temperature`](/docs/attributes-registry/gen-ai.md)| double | The temperature setting for the GenAI request. |`0.0`|`Conditionally Required` If provided by the application. ||
59
+
|[`gen_ai.request.top_p`](/docs/attributes-registry/gen-ai.md)| double | The top_p sampling setting for the GenAI request. |`1.0`|`Conditionally Required` If provided by the application. ||
60
+
|[`server.port`](/docs/attributes-registry/server.md)| int | GenAI server port. [5]|`80`; `8080`; `443`|`Conditionally Required` If `server.address` is set. ||
61
+
|[`gen_ai.request.encoding_formats`](/docs/attributes-registry/gen-ai.md)| string[]| The encoding formats requested in an embeddings operation, if specified. [6]|`["base64"]`; `["float", "binary"]`|`Recommended`||
57
62
|[`gen_ai.request.frequency_penalty`](/docs/attributes-registry/gen-ai.md)| double | The frequency penalty setting for the GenAI request. |`0.1`|`Recommended`||
58
63
|[`gen_ai.request.max_tokens`](/docs/attributes-registry/gen-ai.md)| int | The maximum number of tokens the model generates for a request. |`100`|`Recommended`||
59
64
|[`gen_ai.request.presence_penalty`](/docs/attributes-registry/gen-ai.md)| double | The presence penalty setting for the GenAI request. |`0.1`|`Recommended`||
60
65
|[`gen_ai.request.stop_sequences`](/docs/attributes-registry/gen-ai.md)| string[]| List of sequences that the model will use to stop generating further tokens. |`["forest", "lived"]`|`Recommended`||
61
-
|[`gen_ai.request.temperature`](/docs/attributes-registry/gen-ai.md)| double | The temperature setting for the GenAI request. |`0.0`|`Recommended`||
62
-
|[`gen_ai.request.top_p`](/docs/attributes-registry/gen-ai.md)| double | The top_p sampling setting for the GenAI request. |`1.0`|`Recommended`||
63
-
|[`server.address`](/docs/attributes-registry/server.md)| string | GenAI server address. [6]|`example.com`; `10.1.2.80`; `/tmp/my.sock`|`Recommended`||
66
+
|[`server.address`](/docs/attributes-registry/server.md)| string | GenAI server address. [7]|`example.com`; `10.1.2.80`; `/tmp/my.sock`|`Recommended`||
64
67
65
68
**[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.
66
69
@@ -76,13 +79,25 @@ attribute may help identify the actual system in use for `openai`.
76
79
For custom model, a custom friendly name SHOULD be used.
77
80
If none of these options apply, the `gen_ai.system` SHOULD be set to `_OTHER`.
78
81
79
-
**[3]`gen_ai.request.model`:** The name of the GenAI model a request is being made to. If the model is supplied by a vendor, then the value must be the exact name of the model requested. If the model is a fine-tuned custom model, the value should have a more specific name than the base model that's been fine-tuned.
82
+
**[3]`error.type`:** The `error.type` SHOULD match the error code returned by the Generative AI provider or the client library,
83
+
the canonical name of exception that occurred, or another low-cardinality error identifier.
84
+
Instrumentations SHOULD document the list of errors they report.
80
85
81
-
**[4]`server.port`:**When observed from the client side, and when communicating through an intermediary, `server.port` SHOULD represent the server port behind any intermediaries, for example proxies, if it's available.
86
+
**[4]`gen_ai.request.model`:**The name of the GenAI model a request is being made to. If the model is supplied by a vendor, then the value must be the exact name of the model requested. If the model is a fine-tuned custom model, the value should have a more specific name than the base model that's been fine-tuned.
82
87
83
-
**[5]`gen_ai.request.encoding_formats`:**In some GenAI systems the encoding formats are called embedding types. Also, some GenAI systems only accept a single format per request.
88
+
**[5]`server.port`:**When observed from the client side, and when communicating through an intermediary, `server.port` SHOULD represent the server port behind any intermediaries, for example proxies, if it's available.
84
89
85
-
**[6]`server.address`:** When observed from the client side, and when communicating through an intermediary, `server.address` SHOULD represent the server address behind any intermediaries, for example proxies, if it's available.
90
+
**[6]`gen_ai.request.encoding_formats`:** In some GenAI systems the encoding formats are called embedding types. Also, some GenAI systems only accept a single format per request.
91
+
92
+
**[7]`server.address`:** When observed from the client side, and when communicating through an intermediary, `server.address` SHOULD represent the server address behind any intermediaries, for example proxies, if it's available.
93
+
94
+
---
95
+
96
+
`error.type` 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.
97
+
98
+
| Value | Description | Stability |
99
+
|---|---|---|
100
+
|`_OTHER`| A fallback error value to be used when the instrumentation doesn't define a custom value. ||
86
101
87
102
---
88
103
@@ -129,7 +144,8 @@ services.
129
144
130
145
The `gen_ai.operation.name` SHOULD be `invoke_agent`.
131
146
132
-
The **span name** SHOULD be `invoke_agent {gen_ai.agent.name}`.
147
+
The **span name** SHOULD be `invoke_agent {gen_ai.agent.name}` if `gen_ai.agent.name` is readily available.
148
+
When `gen_ai.agent.name` is not available, it SHOULD be `invoke_agent`.
133
149
Semantic conventions for individual GenAI systems and frameworks MAY specify different span name format.
134
150
135
151
<!-- semconv span.gen_ai.invoke_agent.client -->
@@ -144,12 +160,12 @@ Semantic conventions for individual GenAI systems and frameworks MAY specify dif
144
160
|[`gen_ai.operation.name`](/docs/attributes-registry/gen-ai.md)| string | The name of the operation being performed. [1]|`chat`; `text_completion`; `embeddings`|`Required`||
145
161
|[`gen_ai.system`](/docs/attributes-registry/gen-ai.md)| string | The Generative AI product as identified by the client or server instrumentation. [2]|`openai`|`Required`||
146
162
|[`error.type`](/docs/attributes-registry/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 ||
147
-
|[`gen_ai.agent.description`](/docs/attributes-registry/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.||
163
+
|[`gen_ai.agent.description`](/docs/attributes-registry/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||
148
164
|[`gen_ai.agent.id`](/docs/attributes-registry/gen-ai.md)| string | The unique identifier of the GenAI agent. |`asst_5j66UpCpwteGg4YSxUnt7lPY`|`Conditionally Required` if applicable. ||
149
-
|[`gen_ai.agent.name`](/docs/attributes-registry/gen-ai.md)| string | Human-readable name of the GenAI agent provided by the application. |`Math Tutor`; `Fiction Writer`|`Conditionally Required`If provided by the application.||
165
+
|[`gen_ai.agent.name`](/docs/attributes-registry/gen-ai.md)| string | Human-readable name of the GenAI agent provided by the application. |`Math Tutor`; `Fiction Writer`|`Conditionally Required`when available||
150
166
|[`gen_ai.output.type`](/docs/attributes-registry/gen-ai.md)| string | Represents the content type requested by the client. [4]|`text`; `json`; `image`|`Conditionally Required`[5]||
151
167
|[`gen_ai.request.choice.count`](/docs/attributes-registry/gen-ai.md)| int | The target number of candidate completions to return. |`3`|`Conditionally Required` if available, in the request, and !=1 ||
152
-
|[`gen_ai.request.model`](/docs/attributes-registry/gen-ai.md)| string | The name of the GenAI model a request is being made to. [6]|`gpt-4`|`Conditionally Required` If provided by the application. ||
168
+
|[`gen_ai.request.model`](/docs/attributes-registry/gen-ai.md)| string | The name of the GenAI model a request is being made to. [6]|`gpt-4`|`Conditionally Required` If available. ||
153
169
|[`gen_ai.request.seed`](/docs/attributes-registry/gen-ai.md)| int | Requests with same seed value more likely to return same result. |`100`|`Conditionally Required` if applicable and if the request includes a seed ||
154
170
|[`server.port`](/docs/attributes-registry/server.md)| int | GenAI server port. [7]|`80`; `8080`; `443`|`Conditionally Required` If `server.address` is set. ||
155
171
|[`gen_ai.request.encoding_formats`](/docs/attributes-registry/gen-ai.md)| string[]| The encoding formats requested in an embeddings operation, if specified. [8]|`["base64"]`; `["float", "binary"]`|`Recommended`||
Copy file name to clipboardexpand all lines: docs/gen-ai/gen-ai-spans.md
+1-1
Original file line number
Diff line number
Diff line change
@@ -54,7 +54,7 @@ Many of these attributes only apply to specific GenAI operations. For example, G
54
54
|[`error.type`](/docs/attributes-registry/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 ||
55
55
|[`gen_ai.output.type`](/docs/attributes-registry/gen-ai.md)| string | Represents the content type requested by the client. [4]|`text`; `json`; `image`|`Conditionally Required`[5]||
56
56
|[`gen_ai.request.choice.count`](/docs/attributes-registry/gen-ai.md)| int | The target number of candidate completions to return. |`3`|`Conditionally Required` if available, in the request, and !=1 ||
57
-
|[`gen_ai.request.model`](/docs/attributes-registry/gen-ai.md)| string | The name of the GenAI model a request is being made to. [6]|`gpt-4`|`Conditionally Required` If provided by the application. ||
57
+
|[`gen_ai.request.model`](/docs/attributes-registry/gen-ai.md)| string | The name of the GenAI model a request is being made to. [6]|`gpt-4`|`Conditionally Required` If available. ||
58
58
|[`gen_ai.request.seed`](/docs/attributes-registry/gen-ai.md)| int | Requests with same seed value more likely to return same result. |`100`|`Conditionally Required` if applicable and if the request includes a seed ||
59
59
|[`server.port`](/docs/attributes-registry/server.md)| int | GenAI server port. [7]|`80`; `8080`; `443`|`Conditionally Required` If `server.address` is set. ||
60
60
|[`gen_ai.request.encoding_formats`](/docs/attributes-registry/gen-ai.md)| string[]| The encoding formats requested in an embeddings operation, if specified. [8]|`["base64"]`; `["float", "binary"]`|`Recommended`||
0 commit comments