diff --git a/develop-docs/sdk/telemetry/traces/modules/ai-agents.mdx b/develop-docs/sdk/telemetry/traces/modules/ai-agents.mdx index 4b200f07353b2..8fe799a4daf1f 100644 --- a/develop-docs/sdk/telemetry/traces/modules/ai-agents.mdx +++ b/develop-docs/sdk/telemetry/traces/modules/ai-agents.mdx @@ -37,7 +37,7 @@ Valid examples: ``` gen_ai.invoke_agent ├── gen_ai.chat -├── gen_ai.memory +├── gen_ai.memory.client ├── gen_ai.extract ├── gen_ai.chat ├── gen_ai.execute_tool @@ -55,7 +55,7 @@ gen_ai.invoke_agent ├── gen_ai.execute_tool └── gen_ai.chat gen_ai.decide -gen_ai.memory +gen_ai.memory.client ``` ### Subagent diff --git a/develop-docs/sdk/telemetry/traces/span-data-conventions.mdx b/develop-docs/sdk/telemetry/traces/span-data-conventions.mdx index a054e67592f0d..5eadefc665086 100644 --- a/develop-docs/sdk/telemetry/traces/span-data-conventions.mdx +++ b/develop-docs/sdk/telemetry/traces/span-data-conventions.mdx @@ -91,16 +91,19 @@ Below describes the conventions for the Span interface for the `data` field on t ## AI -| Attribute | Type | Description | Examples | -|-----------------------------|---------|-------------------------------------------------------|------------------------------------------| -| `ai.input_messages` | string | The input messages sent to the model | `[{"role": "user", "message": "hello"}]` | -| `ai.completion_tоkens.used` | int | The number of tokens used to respond to the message | `10` | -| `ai.prompt_tоkens.used` | int | The number of tokens used to process just the prompt | `20` | -| `ai.total_tоkens.used` | int | The total number of tokens used to process the prompt | `30` | -| `ai.model_id` | list | The vendor-specific ID of the model used | `"gpt-4"` | -| `ai.streaming` | boolean | Whether the request was streamed back | `true` | -| `ai.responses` | list | The response messages sent back by the AI model | `["hello", "world"]` | - +These attributes follow [Sentry Conventions](https://github.com/getsentry/sentry-conventions/), the source of truth for `gen_ai.*` attributes. For span ops and the full set of attributes per span type, see the AI Agents Module. + + ## Thread @@ -120,10 +123,17 @@ Below describes the conventions for the Span interface for the `data` field on t Names that SDKs are still sending so we cannot remove them yet, but should not be used in new code. -| Attribute | New name | -| ------------------- | ----------------------------------- | -| `method` | `http.request.method` | -| `http.method` | `http.request.method` | -| `Encoded Body Size` | `http.response_content_length` | -| `Decoded Body Size` | `http.decoded_response_body_length` | -| `Transfer Size` | `http.response_transfer_size ` | +| Attribute | New name | +| --------------------------- | ----------------------------------- | +| `method` | `http.request.method` | +| `http.method` | `http.request.method` | +| `Encoded Body Size` | `http.response_content_length` | +| `Decoded Body Size` | `http.decoded_response_body_length` | +| `Transfer Size` | `http.response_transfer_size ` | +| `ai.input_messages` | `gen_ai.input.messages` | +| `ai.responses` | `gen_ai.output.messages` | +| `ai.model_id` | `gen_ai.request.model` | +| `ai.streaming` | `gen_ai.response.streaming` | +| `ai.prompt_tokens.used` | `gen_ai.usage.input_tokens` | +| `ai.completion_tokens.used` | `gen_ai.usage.output_tokens` | +| `ai.total_tokens.used` | `gen_ai.usage.total_tokens` |