Skip to content

Commit 1524e8a

Browse files
authored
chore(ai): add information about gen_ai.request.messages size limits (#15271)
1 parent 53e2e19 commit 1524e8a

File tree

2 files changed

+5
-0
lines changed

2 files changed

+5
-0
lines changed

develop-docs/sdk/expected-features/data-handling.mdx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -121,6 +121,7 @@ Fields in the event payload that allow user-specified or dynamic values are rest
121121
- Messages are limited to 8192 characters.
122122
- HTTP data (the body) is limited to 8kB. Always trim HTTP data before attaching it to the event.
123123
- Stack traces are limited to 50 frames. If more are sent, data will be removed from the middle of the stack.
124+
- Input messages in AI integrations recorded in the span attribute `gen_ai.request.messages` are limited to 20kB per span. Messages are trimmed and truncated if they exceed the limit, retaining the most recent messages.
124125

125126
Additionally, size limits apply to all store requests for the total size of the request, event payload, and attachments. Sentry rejects all requests exceeding these limits. Please refer the following resources for the exact size limits:
126127

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

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -191,3 +191,7 @@ Some attributes are common to all AI Agents spans:
191191
| `"openai"` | OpenAI |
192192
| `"perplexity"` | Perplexity |
193193
| `"xai"` | xAI |
194+
195+
## Size Limits
196+
In addition to the [general size limits](/concepts/data-management/size-limits/) for events, spans, and attachments, there are specific size limits for AI integrations:
197+
- Input messages in AI integrations recorded in the span attribute `gen_ai.request.messages` are limited to 20kB per span. Messages are trimmed and truncated if they exceed the limit, retaining the most recent messages.

0 commit comments

Comments
 (0)