Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add SentryOptions.DisableSentryHttpMessageHandler #3879

Merged
merged 5 commits into from
Jan 12, 2025

Conversation

jamescrosswell
Copy link
Collaborator

Addresses the duplicate trace problem described in #3843:

Essentially we allow SDK users to disable the SentryHttpMessageHandler if they are already using the OpenTelemetry.Instrumentation.Http package to trace outbound requests... to avoid duplicate instrumentation.

This PR does not address any issues around YARP - that would require separate exploration.

@jamescrosswell jamescrosswell marked this pull request as ready for review January 9, 2025 09:49
@jamescrosswell jamescrosswell requested a review from vaind January 9, 2025 09:50
Copy link
Member

@bruno-garcia bruno-garcia left a comment

Choose a reason for hiding this comment

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

Can we flip this to false automagically if OpenTelemetry.Instrumentation.Http is installed? If so, do we need a public options or would internal with InternalsVisibleTo be enough?

CHANGELOG.md Outdated Show resolved Hide resolved
Co-authored-by: Bruno Garcia <[email protected]>
@jamescrosswell jamescrosswell merged commit dc3c0dd into main Jan 12, 2025
11 of 12 checks passed
@jamescrosswell jamescrosswell deleted the httpclient-duplicate-spans branch January 12, 2025 20:12
Copy link
Contributor

Fails
🚫 Please consider adding a changelog entry for the next release.

Instructions and example for changelog

Please add an entry to CHANGELOG.md to the "Unreleased" section. Make sure the entry includes this PR's number.

Example:

## Unreleased

- Add SentryOptions.DisableSentryHttpMessageHandler ([#3879](https://github.com/getsentry/sentry-dotnet/pull/3879))

If none of the above apply, you can opt out of this check by adding #skip-changelog to the PR description.

Generated by 🚫 dangerJS against e0a6948

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants