Skip to content

Conversation

@JamesNK
Copy link
Contributor

@JamesNK JamesNK commented Aug 20, 2025

Fixes #3014

Changes

Add ASP.NET Core telemetry metrics and traces for .NET 10

Merge requirement checklist

  • CONTRIBUTING guidelines followed (license requirements, nullable enabled, static analysis, etc.)
  • Unit tests added/updated
  • Appropriate CHANGELOG.md files updated for non-trivial changes
  • Changes in public API reviewed (if applicable)

@JamesNK JamesNK requested a review from a team as a code owner August 20, 2025 04:27
@github-actions github-actions bot added the comp:instrumentation.aspnetcore Things related to OpenTelemetry.Instrumentation.AspNetCore label Aug 20, 2025
@codecov
Copy link

codecov bot commented Aug 20, 2025

Codecov Report

❌ Patch coverage is 86.95652% with 3 lines in your changes missing coverage. Please review.
✅ Project coverage is 69.71%. Comparing base (951bb18) to head (3e753df).
⚠️ Report is 2 commits behind head on main.
✅ All tests successful. No failed tests found.

Files with missing lines Patch % Lines
...eInstrumentationTracerProviderBuilderExtensions.cs 40.00% 3 Missing ⚠️
Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #3012      +/-   ##
==========================================
+ Coverage   69.60%   69.71%   +0.11%     
==========================================
  Files         413      403      -10     
  Lines       16185    16138      -47     
==========================================
- Hits        11265    11251      -14     
+ Misses       4920     4887      -33     
Flag Coverage Δ
unittests-Instrumentation.AspNet 74.93% <ø> (-0.25%) ⬇️
unittests-Instrumentation.AspNetCore 70.76% <86.95%> (+0.44%) ⬆️
unittests-Instrumentation.Cassandra ?

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
...reInstrumentationMeterProviderBuilderExtensions.cs 100.00% <100.00%> (ø)
...spNetCore/AspNetCoreTraceInstrumentationOptions.cs 95.65% <100.00%> (+0.19%) ⬆️
...eInstrumentationTracerProviderBuilderExtensions.cs 89.36% <40.00%> (-5.99%) ⬇️

... and 17 files with indirect coverage changes

🚀 New features to boost your workflow:
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@martincostello
Copy link
Member

Is the intention that this replace #2873?

Comment on lines 1 to 2
OpenTelemetry.Instrumentation.AspNetCore.AspNetCoreTraceInstrumentationOptions.EnableBlazorSupport.get -> bool
OpenTelemetry.Instrumentation.AspNetCore.AspNetCoreTraceInstrumentationOptions.EnableBlazorSupport.set -> void
Copy link
Member

Choose a reason for hiding this comment

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

Personally I prefer this shorter name, but asking as I had the thought on the other PR, should this instead be EnableAspNetCoreBlazorSupport for consistency with the other property names?

@JamesNK
Copy link
Contributor Author

JamesNK commented Aug 20, 2025

Is the intention that this replace #2873?

I didn't see it. But it could replace it.

@martincostello
Copy link
Member

But it could replace it.

OK I'll close that one (as the CI is failing) in favour of this one.

Could you copy over the test from https://github.com/open-telemetry/opentelemetry-dotnet-contrib/pull/2873/files#diff-aebeb6657672039acc0cda146bade415e420a70e30fb6571c73f5df05cd6c2bd please (assuming it still makes sense), then I can enable it in #2822 after this is merged and I rebase it.

@JamesNK
Copy link
Contributor Author

JamesNK commented Aug 21, 2025

PR updated with feedback.


## Unreleased

* Added support for listening to ASP.NET Core Blazor activities.
Copy link
Member

Choose a reason for hiding this comment

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

Is it Blazor only, or it should be adjusted?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Metrics were added for many features.
Activities were only added for Blazor.

@Kielek Kielek merged commit c938a14 into open-telemetry:main Aug 21, 2025
65 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

comp:instrumentation.aspnetcore Things related to OpenTelemetry.Instrumentation.AspNetCore

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[feature request] Add ASP.NET Core telemetry new in .NET 10

5 participants