Skip to content

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
trentm
trentm previously approved these changes Feb 14, 2025
@trentm
Copy link
Member

trentm commented Feb 14, 2025

Are the e2e test failures still expected?

@stevejgordon
Copy link
Contributor Author

Are the e2e test failures still expected?

For now, yes. I need to spend some time on those after decoupling the build/test of auto instrumentation.

@stevejgordon stevejgordon merged commit ade4cd4 into main Feb 17, 2025
4 of 6 checks passed
@stevejgordon stevejgordon deleted the native-net9-traces-and-metrics branch March 10, 2025 13:02
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

3 participants