From 31e19df761df139d469d4376c5f2877ab5769f03 Mon Sep 17 00:00:00 2001 From: Alexander Alderman Webb Date: Mon, 2 Mar 2026 17:19:56 +0100 Subject: [PATCH 1/2] ref(ai-agents-sdks): Add fallback span description when there is not agent name --- develop-docs/sdk/telemetry/traces/modules/ai-agents.mdx | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/develop-docs/sdk/telemetry/traces/modules/ai-agents.mdx b/develop-docs/sdk/telemetry/traces/modules/ai-agents.mdx index 790db51b3b590..24f794c337b7a 100644 --- a/develop-docs/sdk/telemetry/traces/modules/ai-agents.mdx +++ b/develop-docs/sdk/telemetry/traces/modules/ai-agents.mdx @@ -22,7 +22,7 @@ Sentry Conventions is the single source of truth. Describes GenAI agent creation and is usually applicable when working with remote agent services. - Span `op` SHOULD be `"gen_ai.create_agent"`. -- Span `name` SHOULD be `"create_agent {gen_ai.agent.name}"`. (e.g. `"create_agent Weather Agent"`) +- Span `name` SHOULD be `"create_agent {gen_ai.agent.name}"`. (e.g. `"create_agent Weather Agent"`) **[8]** - Attribute `gen_ai.operation.name` MUST be `"create_agent"`. - Attribute `gen_ai.agent.name` SHOULD be set to the agents name. (e.g. `"Weather Agent"`) - If provided, the attribute `gen_ai.request.model` MUST be the agent's default request model. (e.g. `"gpt-4o"`) @@ -35,7 +35,7 @@ Describes AI agent invocation. Agent invocations represent operations that can include multiple model calls, or some auxiliary work that goes beyond transforming the model input and output. - Span `op` SHOULD be `"gen_ai.invoke_agent"`. -- Span `name` SHOULD be `"invoke_agent {gen_ai.agent.name}"`. (e.g. `"invoke_agent Weather Agent"`) +- Span `name` SHOULD be `"invoke_agent {gen_ai.agent.name}"`. (e.g. `"invoke_agent Weather Agent"`) **[8]** - Attribute `gen_ai.operation.name` MUST be `"invoke_agent"`. - Attribute `gen_ai.agent.name` SHOULD be set to the agents name. (e.g. `"Weather Agent"`) - If provided, the attribute `gen_ai.request.model` MUST be the agent's default request model. (e.g. `"gpt-4o"`) @@ -247,3 +247,8 @@ The input list should include the most recent messages up to and including the m **[7]** Binary blobs in the input list should be replaced with the string `"[Blob substitute]"` in positions where binary data is expected in a given schema. Only binary blobs in positions where binary data is explicitly expected must be redacted. For example, in OpenAI Completions schema, only binary blobs in content blocks with type `image_url`, `input_audio` or `file` should be redacted. + +**[8]** + +In some agent libraries, the agent name is optional, and some do not provide an option to name your agents. +In these cases, the span name SHOULD be `"invoke_agent {call_id}"`, where `call_id` is some user-provided identifier for the agent invocation. For example, `functionId` in Vercel AI. From 6ee93b11d16e0f2fc74fa815fc3a79af6e518625 Mon Sep 17 00:00:00 2001 From: Alexander Alderman Webb Date: Mon, 2 Mar 2026 17:25:13 +0100 Subject: [PATCH 2/2] . --- develop-docs/sdk/telemetry/traces/modules/ai-agents.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/develop-docs/sdk/telemetry/traces/modules/ai-agents.mdx b/develop-docs/sdk/telemetry/traces/modules/ai-agents.mdx index 24f794c337b7a..d216b524a6795 100644 --- a/develop-docs/sdk/telemetry/traces/modules/ai-agents.mdx +++ b/develop-docs/sdk/telemetry/traces/modules/ai-agents.mdx @@ -22,7 +22,7 @@ Sentry Conventions is the single source of truth. Describes GenAI agent creation and is usually applicable when working with remote agent services. - Span `op` SHOULD be `"gen_ai.create_agent"`. -- Span `name` SHOULD be `"create_agent {gen_ai.agent.name}"`. (e.g. `"create_agent Weather Agent"`) **[8]** +- Span `name` SHOULD be `"create_agent {gen_ai.agent.name}"`. (e.g. `"create_agent Weather Agent"`) - Attribute `gen_ai.operation.name` MUST be `"create_agent"`. - Attribute `gen_ai.agent.name` SHOULD be set to the agents name. (e.g. `"Weather Agent"`) - If provided, the attribute `gen_ai.request.model` MUST be the agent's default request model. (e.g. `"gpt-4o"`)