You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
## DESCRIBE YOUR PR
This PR updates the documentation for the `OpenAIAgentsIntegration` to
reflect that it is automatically registered when the `agents` package is
detected.
The documentation examples have been simplified to remove explicit
`OpenAIAgentsIntegration()` setup from `sentry_sdk.init()`, aligning
with the goal of providing an "out-of-the-box" experience for AI
observability.
An "Options" section has been added, similar to other AI integrations,
to explain when explicit registration is still useful (e.g., to
configure options like `include_prompts`).
## IS YOUR CHANGE URGENT?
- [ ] Urgent deadline (GA date, etc.): <!-- ENTER DATE HERE -->
- [ ] Other deadline: <!-- ENTER DATE HERE -->
- [x] 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/)
---
[Slack
Thread](https://sentry.slack.com/archives/C062N2F39V4/p1756205178799769?thread_ts=1756205178.799769&cid=C062N2F39V4)
<a
href="https://cursor.com/background-agent?bcId=bc-f30ce8b2-6f2d-4a20-aa8b-29b3ff769b12">
<picture>
<source media="(prefers-color-scheme: dark)"
srcset="https://cursor.com/open-in-cursor-dark.svg">
<source media="(prefers-color-scheme: light)"
srcset="https://cursor.com/open-in-cursor-light.svg">
<img alt="Open in Cursor" src="https://cursor.com/open-in-cursor.svg">
</picture>
</a>
<a
href="https://cursor.com/agents?id=bc-f30ce8b2-6f2d-4a20-aa8b-29b3ff769b12">
<picture>
<source media="(prefers-color-scheme: dark)"
srcset="https://cursor.com/open-in-web-dark.svg">
<source media="(prefers-color-scheme: light)"
srcset="https://cursor.com/open-in-web-light.svg">
<img alt="Open in Web" src="https://cursor.com/open-in-web.svg">
</picture>
</a>
Co-authored-by: Cursor Agent <[email protected]>
# see https://docs.sentry.io/platforms/python/data-management/data-collected/ for more info
86
70
send_default_pii=True,
87
-
integrations=[
88
-
OpenAIAgentsIntegration(),
89
-
],
90
71
)
91
72
92
73
await agents.Runner.run(
@@ -109,7 +90,36 @@ Data on the following will be collected:
109
90
- number of input and output tokens used
110
91
- LLM models usage
111
92
112
-
Sentry considers LLM and tool inputs/outputs as PII and doesn't include PII data by default. If you want to include the data, set `send_default_pii=True` in the `sentry_sdk.init()` call.
93
+
Sentry considers LLM and tool inputs/outputs as PII and doesn't include PII data by default. If you want to include the data, set `send_default_pii=True` in the `sentry_sdk.init()` call. To explicitly exclude prompts and outputs despite `send_default_pii=True`, configure the integration with `include_prompts=False` as shown in the [Options section](#options) below.
94
+
95
+
## Options
96
+
97
+
By adding `OpenAIAgentsIntegration` to your `sentry_sdk.init()` call explicitly, you can set options for `OpenAIAgentsIntegration` to change its behavior:
98
+
99
+
```python
100
+
import sentry_sdk
101
+
from sentry_sdk.integrations.openai_agents import OpenAIAgentsIntegration
102
+
103
+
sentry_sdk.init(
104
+
# ...
105
+
# Add data like inputs and responses;
106
+
# see https://docs.sentry.io/platforms/python/data-management/data-collected/ for more info
107
+
send_default_pii=True,
108
+
integrations=[
109
+
OpenAIAgentsIntegration(
110
+
include_prompts=False, # LLM and tool inputs/outputs will be not sent to Sentry, despite send_default_pii=True
111
+
),
112
+
],
113
+
)
114
+
```
115
+
116
+
You can pass the following keyword arguments to `OpenAIAgentsIntegration()`:
117
+
118
+
-`include_prompts`:
119
+
120
+
Whether LLM and tool inputs and outputs should be sent to Sentry. Sentry considers this data personal identifiable data (PII) by default. If you want to include the data, set `send_default_pii=True` in the `sentry_sdk.init()` call. To explicitly exclude prompts and outputs despite `send_default_pii=True`, configure the integration with `include_prompts=False`.
0 commit comments