Repository navigation
docs(dotnet): Document GenAI data collection for AI Agents - #20870
Merged
jamescrosswell merged 2 commits intoNov 24, 2026
Merged
Conversation
The snippets set RecordInputs and RecordOutputs to true. Once Sentry.Extensions.AI honours DataCollection.GenAI, an explicit flag overrides it for that chat client, so an app that copied the snippet would keep sending prompts and responses after turning GenAI off. Drop the flags from both snippets, describe how they combine with DataCollection, and show how to turn AI content off for every chat client with ConfigureDataCollection. Closes getsentry/sentry-dotnet#5954 Co-Authored-By: Claude Opus 5.5 <[email protected]>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
1 Skipped Deployment
|
Contributor
|
Getting ready to monitor this change · Rollout details
|
ric-oliv
reviewed
Nov 20, 2026
Member
|
Two small things in the ASP.NET Core snippet. They were there before this PR, but the snippet doesn't compile as written. This line is missing its semicolon: builder.Services.AddSingleton<IChatClient>(chatClient);
return Results.Ok(response.Text); |
ric-oliv
reviewed
Nov 20, 2026
- Warn that calling ConfigureDataCollection replaces SendDefaultPii, so an app on the default starts sending data such as IP addresses and failed request headers. Point to the per-client flags as the alternative. - Say the GenAI options only take effect from 7.1.0. Earlier versions accept them but Sentry.Extensions.AI ignores them. - Note that tool call arguments and results reach spans through both flags, so turning off only one doesn't keep them out. - Fix the ASP.NET Core snippet: a missing semicolon, and ChatResponse has Text, not Message. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Collaborator
Author
|
Fixed both in 8d183cca86: the semicolon, and |
Open
15 of 20 tasks
Member
|
@jamescrosswell now that the page says "Starting with version 7.1.0", I think we can drop the "merge only with the release" note from the description and merge as soon as the docs team approves. What do you think? |
This branch was successfully deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
DESCRIBE YOUR PR
getsentry/sentry-dotnet#5931 makes
Sentry.Extensions.AIhonourDataCollection.GenAI.Inputs/Outputs, and an explicitRecordInputs/RecordOutputsonAddSentry()overrides them for that chat client. The AI Agents page sets both flags totrue, so an app that copied the snippet would keep sending prompts and responses after turningGenAIoff.RecordInputs/RecordOutputsfrom the main and ASP.NET Core snippets.ConfigureDataCollection.Closes getsentry/sentry-dotnet#5954
IS YOUR CHANGE URGENT?
Help us prioritize incoming PRs by letting us know when the change needs to go live.
Select exactly one option. For deadlines, replace
YYYY-MM-DDwith the due date. You can update this information later by editing the PR description.SLA
Thanks in advance for your help!
PRE-MERGE CHECKLIST
Make sure you've checked the following before merging your changes:
🤖 Generated with Claude Code