Skip to content

Commit 362181a

Browse files
antonpirkerbitsandfoxes
authored andcommitted
Minor changes to wording (#14157)
<!-- Use this checklist to make sure your PR is ready for merge. You may delete any sections you don't need. --> ## DESCRIBE YOUR PR Just some typos and grammar fixes to develop docs. ## IS YOUR CHANGE URGENT? Help us prioritize incoming PRs by letting us know when the change needs to go live. - [ ] Urgent deadline (GA date, etc.): <!-- ENTER DATE HERE --> - [ ] Other deadline: <!-- ENTER DATE HERE --> - [ ] None: Not urgent, can wait up to 1 week+ ## SLA - Teamwork makes the dream work, so please add a reviewer to your PRs. - Please give the docs team up to 1 week to review your PR unless you've added an urgent due date to it. Thanks in advance for your help! ## PRE-MERGE CHECKLIST *Make sure you've checked the following before merging your changes:* - [ ] Checked Vercel preview for correctness, including links - [ ] PR was reviewed and approved by any necessary SMEs (subject matter experts) - [ ] PR was reviewed and approved by a member of the [Sentry docs team](https://github.com/orgs/getsentry/teams/docs) ## LEGAL BOILERPLATE <!-- Sentry employees and contractors can delete or ignore this section. --> Look, I get it. The entity doing business as "Sentry" was incorporated in the State of Delaware in 2015 as Functional Software, Inc. and is gonna need some rights from me in order to utilize my contributions in this here PR. So here's the deal: I retain all rights, title and interest in and to my contributions, and by keeping this boilerplate intact I confirm that Sentry can use, modify, copy, and redistribute my contributions, under Sentry's choice of terms. ## EXTRA RESOURCES - [Sentry Docs contributor guide](https://docs.sentry.io/contributing/)
1 parent 0759416 commit 362181a

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)