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

Use native .NET 9 traces and metrics for HTTP instrumentation #213

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

stevejgordon
Copy link
Contributor

@stevejgordon stevejgordon commented Feb 13, 2025

On .NET 9, the BCL includes OTel-compliant instrumentation for HTTP, which is now preferred over using the contrib instrumentation. For .NET 9+ targets, we check if the contrib library is referenced, and if so, load that via reflection. Otherwise, we register the System.Net.Http source.

Closes #195

@stevejgordon stevejgordon requested a review from a team February 13, 2025 12:04
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.

Add .NET 9 target and prefer built in runtime metrics
1 participant