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/gen-ai-agent-spans.md
+6-3
Original file line number
Diff line number
Diff line change
@@ -49,7 +49,9 @@ Semantic conventions for individual GenAI systems and frameworks MAY specify dif
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
51
|[`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. ||
52
+
|[`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
53
|[`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. ||
54
+
|[`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 ||
53
55
|[`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. ||
54
56
|[`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
57
|[`server.port`](/docs/attributes-registry/server.md)| int | GenAI server port. [4]|`80`; `8080`; `443`|`Conditionally Required` If `server.address` is set. ||
@@ -129,7 +131,8 @@ services.
129
131
130
132
The `gen_ai.operation.name` SHOULD be `invoke_agent`.
131
133
132
-
The **span name** SHOULD be `invoke_agent {gen_ai.agent.name}`.
134
+
The **span name** SHOULD be `invoke_agent {gen_ai.agent.name}` if `gen_ai.agent.name` is readily available.
135
+
When `gen_ai.agent.name` is not available, it SHOULD be `invoke_agent`.
133
136
Semantic conventions for individual GenAI systems and frameworks MAY specify different span name format.
134
137
135
138
<!-- semconv span.gen_ai.invoke_agent.client -->
@@ -144,9 +147,9 @@ Semantic conventions for individual GenAI systems and frameworks MAY specify dif
144
147
|[`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
148
|[`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
149
|[`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.||
150
+
|[`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
151
|[`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.||
152
+
|[`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
153
|[`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
154
|[`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
155
|[`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. ||
0 commit comments