Skip to content

docs(otel): note that Sentry.OpenTelemetry doesn't apply ConfigureDataCollection - #5967

Open
jamescrosswell wants to merge 2 commits into
mainfrom
ai/otel-datacollection-remarks
Open

jamescrosswell wants to merge 2 commits into
mainfrom
ai/otel-datacollection-remarks

Conversation

@jamescrosswell

@jamescrosswell jamescrosswell commented Nov 18, 2026 •

Copy link
Copy Markdown
Collaborator

Adds <remarks> to TracerProviderBuilderExtensions.AddSentry, the UseOpenTelemetry overload that calls it, and SentrySpanProcessor. They say that the user and span attributes this integration collects don't follow ConfigureDataCollection. The core enricher still applies UserInfo to these transactions.

Sentry.OpenTelemetry is deprecated in favour of Sentry.OpenTelemetry.Exporter, so it won't be moved onto the DataCollection options. #5435 is closed as not planned. Part of #5420.

The SentrySpanProcessor remark leaves out the user, because only AddSentry registers the enricher that sets it.

#skip-changelog

🤖 Generated with Claude Code

…aCollection

Sentry.OpenTelemetry is deprecated in favour of Sentry.OpenTelemetry.Exporter,
so it won't be moved onto the DataCollection options (#5435).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

@sentry-junior sentry-junior Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good to approve, with optional comments

This change only touches docs. It adds <remarks> to the deprecated Sentry.OpenTelemetry entry points saying they don't apply ConfigureDataCollection. What the remarks describe matches the code (AspNetCoreEnricher gated on SendDefaultPii, QueryStringFilter using the fixed SensitiveDataFilter deny list, other attributes passed through), and nothing changes at runtime or in the public API.

  • Optional: "doesn't apply ConfigureDataCollection" reads broader than the code. SentryClient still runs Enricher.Apply on these transactions (src/Sentry/SentryClient.cs:210), which gates the environment username and the {{auto}} IP on DataCollection.UserInfo (src/Sentry/Internal/Enricher.cs:17). Consider limiting the remark to what the integration collects itself, e.g. "The span attributes and the user that this integration collects don't follow ConfigureDataCollection…", in TracerProviderBuilderExtensions.cs:43 and SentrySpanProcessor.cs:14.
  • Optional: SentryOptionsExtensions.UseOpenTelemetry(SentryOptions, TracerProviderBuilder, …) (src/Sentry.OpenTelemetry/SentryOptionsExtensions.cs:35-41) calls AddSentry internally. Users who start from that overload won't see the remark, so consider adding the same remark there, or a <seealso cref="TracerProviderBuilderExtensions.AddSentry"/>.

This is an automated preliminary review.

@jamescrosswell
jamescrosswell marked this pull request as ready for review November 18, 2026 21:29
@github-actions github-actions Bot added the risk: high PR risk score: high label Nov 18, 2026
The core enricher still applies DataCollection.UserInfo to these
transactions, so the remarks now cover only the user and span attributes
Sentry.OpenTelemetry collects itself. The UseOpenTelemetry overload that
calls AddSentry gets the same remark.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@jamescrosswell

Copy link
Copy Markdown
Collaborator Author

Good to approve, with optional comments

It's really just warning people that none of the new DataCollection functionality is being built/tested for this now deprecated package.

I don't think it's worth wordsmithing too much, since we're going to remove this deprecated package in the next major anyway.

@codecov

codecov Bot commented Nov 18, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 77.70%. Comparing base (2e15186) to head (32a2242).

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #5967      +/-   ##
==========================================
+ Coverage   77.69%   77.70%   +0.01%     
==========================================
  Files         535      535              
  Lines       19727    19727              
  Branches     3932     3932              
==========================================
+ Hits        15326    15328       +2     
+ Misses       3545     3544       -1     
+ Partials      856      855       -1     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

risk: high PR risk score: high

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant