Skip to content

Commit 520fd15

Browse files
committed
minor changes to wording
1 parent db4ea29 commit 520fd15

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

develop-docs/sdk/telemetry/traces/modules/ai-agents.mdx

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,9 @@ The AI Agents module is agnostic to the library used. The SDK will instrument ex
66

77
## Spans Conventions
88

9-
For your AI agents data to show up in the Sentry [AI Agents Insights](https://sentry.io/orgredirect/organizations/:orgslug/insights/agents/) a couple of different spans must be created and have well defined names and data attributes. See below.
9+
For your AI agents data to show up in the Sentry [AI Agents Insights](https://sentry.io/orgredirect/organizations/:orgslug/insights/agents/), a couple of different spans must be created and have well-defined names and data attributes. See below.
1010

11-
We try to follow the [OpenTelemetry Semantic Conventions](https://opentelemetry.io/docs/specs/semconv/gen-ai/) for Generative AI as close as possible. Being 100% compatible is not yet possible, because OpenTelemetry as "Span Events" which Sentry does not support. The input/output to/from an AI model is stored in span events in OpenTelemetry, as this is not possible in Sentry we add this data onto span attributes as a list.
11+
We try to follow the [OpenTelemetry Semantic Conventions](https://opentelemetry.io/docs/specs/semconv/gen-ai/) for Generative AI as close as possible. Being 100% compatible is not yet possible, because OpenTelemetry has "Span Events" which Sentry does not support. The input/output to/from an AI model is stored in span events in OpenTelemetry. Since this is not possible in Sentry, we add this data onto span attributes as a list.
1212

1313
### Invoke Agent Span
1414

@@ -39,8 +39,8 @@ Additional attributes on the span:
3939
| `gen_ai.usage.output_tokens` | int | optional | The number of tokens used in the AI response. | `100` |
4040
| `gen_ai.usage.total_tokens` | int | optional | The total number of tokens used to process the prompt. (input and output) | `190` |
4141

42-
- **[0]:** As span attributes only allow primitive data types (like `int`, `float`, `boolean`, `string`) this needs to be a stringified version of a list of dictionaries. Do NOT set `[{"foo": "bar"}]` but rather the string `"[{\"foo\": \"bar\"}]"`.
43-
- **[1]:** Each item in the list of messages has the format `{role:"", content:""}` where `role` can be `"user"`, `"assistant"`, or `"system"` and `content` can either be a string or a list of dictionaries.
42+
- **[0]:** Span attributes only allow primitive data types (like `int`, `float`, `boolean`, `string`). This means you need to use a stringified version of a list of dictionaries. Do NOT set `[{"foo": "bar"}]` but rather the string `"[{\"foo\": \"bar\"}]"`.
43+
- **[1]:** Each message item uses the format `{role:"", content:""}`. The `role` can be `"user"`, `"assistant"`, or `"system"`. The `content` can be either a string or a list of dictionaries.
4444

4545
### AI Client Span
4646

@@ -69,8 +69,8 @@ Additional attributes on the span:
6969
| `gen_ai.usage.output_tokens` | int | optional | The number of tokens used in the AI response. | `100` |
7070
| `gen_ai.usage.total_tokens` | int | optional | The total number of tokens used to process the prompt. (input and output) | `190` |
7171

72-
- **[0]:** As span attributes only allow primitive data types this needs to be a stringified version of a list of dictionaries. Do NOT set `[{"foo": "bar"}]` but rather the string `"[{\"foo\": \"bar\"}]"`.
73-
- **[1]:** Each item in the list has the format `{role:"", content:""}` where `role` can be `"user"`, `"assistant"`, or `"system"` and `content` can either be a string or a list of dictionaries.
72+
- **[0]:** Span attributes only allow primitive data types. This means you need to use a stringified version of a list of dictionaries. Do NOT set `[{"foo": "bar"}]` but rather the string `"[{\"foo\": \"bar\"}]"`.
73+
- **[1]:** Each message item uses the format `{role:"", content:""}`. The `role` can be `"user"`, `"assistant"`, or `"system"`. The `content` can be either a string or a list of dictionaries.
7474

7575
### Execute Tool Span
7676

@@ -87,7 +87,7 @@ Additional attributes on the span:
8787
| :------------------------ | :----- | :---------------- | :--------------------------------------------------- | :----------------------------------------- |
8888
| `gen_ai.tool.description` | string | optional | Description of the tool executed. | `"Tool returning a random number"` |
8989
| `gen_ai.tool.input` | string | optional | Input that was given to the executed tool as string. | `"{\"max\":10}"` |
90-
| `gen_ai.tool.name:` | string | optional | Name of the tool executed. | `"random_number"` |
90+
| `gen_ai.tool.name` | string | optional | Name of the tool executed. | `"random_number"` |
9191
| `gen_ai.tool.output` | string | optional | The output from the tool. | `"7"` |
9292
| `gen_ai.tool.type` | string | optional | The type of the tools. | `"function"`; `"extension"`; `"datastore"` |
9393

@@ -96,7 +96,7 @@ Additional attributes on the span:
9696
A span that describes the handoff from one agent to another agent.
9797

9898
- The spans `op` MUST be `"gen_ai.handoff"`.
99-
- The spans `name` SHOULD be `"handoff from {from_agent} to {from_agent}"`.
99+
- The spans `name` SHOULD be `"handoff from {from_agent} to {to_agent}"`.
100100
- All [Common Span Attributes](#common-span-attributes) SHOULD be set (all `required` common attributes MUST be set).
101101

102102
## Common Span Attributes

0 commit comments

Comments
 (0)