opentelemetry-dotnet icon indicating copy to clipboard operation
opentelemetry-dotnet copied to clipboard

[ASP.NET Core] Enable diagnostic source events using explicit names

Open vishweshbankwar opened this issue 3 years ago • 5 comments

Towards #3495 .

Changes

This change will enable diagnostic source event subscription for asp.net core for the specified list of events.

Assumption: ASP.NET Core library is using the best practices defined to write diagnostic source events.

This may also help with some perf as it will prevent the payload creation and writing of non-desired events.

Also, this can be extended to other instrumentation libraries based on DiagnosticSource events.

For significant contributions please make sure you have completed the following items:

  • [ ] Appropriate CHANGELOG.md updated for non-trivial changes
  • [ ] Design discussion issue #
  • [ ] Changes in public API reviewed

vishweshbankwar avatar Aug 02 '22 18:08 vishweshbankwar

Codecov Report

Merging #3519 (81134e3) into main (988a27b) will decrease coverage by 0.09%. The diff coverage is 100.00%.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #3519      +/-   ##
==========================================
- Coverage   87.74%   87.64%   -0.10%     
==========================================
  Files         283      283              
  Lines       10286    10296      +10     
==========================================
- Hits         9025     9024       -1     
- Misses       1261     1272      +11     
Impacted Files Coverage Δ
...umentation.AspNetCore/AspNetCoreInstrumentation.cs 100.00% <100.00%> (ø)
...entation/ExportClient/OtlpGrpcTraceExportClient.cs 50.00% <0.00%> (-28.58%) :arrow_down:
...xporter.OpenTelemetryProtocol/OtlpTraceExporter.cs 59.09% <0.00%> (-18.19%) :arrow_down:
...emetry.Api/Internal/OpenTelemetryApiEventSource.cs 73.52% <0.00%> (-8.83%) :arrow_down:
...ZPages/Implementation/ZPagesExporterEventSource.cs 56.25% <0.00%> (-6.25%) :arrow_down:
...metryProtocol/Implementation/ActivityExtensions.cs 91.75% <0.00%> (-3.30%) :arrow_down:
...tation.AspNetCore/Implementation/HttpInListener.cs 89.80% <0.00%> (-1.28%) :arrow_down:
...ter.ZPages/Implementation/ZPagesActivityTracker.cs 100.00% <0.00%> (+2.85%) :arrow_up:
src/OpenTelemetry/Logs/Pool/LogRecordSharedPool.cs 100.00% <0.00%> (+21.05%) :arrow_up:

codecov[bot] avatar Aug 02 '22 18:08 codecov[bot]

This PR was marked stale due to lack of activity and will be closed in 7 days. Commenting or Pushing will instruct the bot to automatically remove the label. This bot runs once per day.

github-actions[bot] avatar Aug 12 '22 03:08 github-actions[bot]

Closed as inactive. Feel free to reopen if this PR is still being worked on.

github-actions[bot] avatar Aug 19 '22 03:08 github-actions[bot]

This PR was marked stale due to lack of activity and will be closed in 7 days. Commenting or Pushing will instruct the bot to automatically remove the label. This bot runs once per day.

github-actions[bot] avatar Aug 30 '22 04:08 github-actions[bot]

Closed as inactive. Feel free to reopen if this PR is still being worked on.

github-actions[bot] avatar Sep 06 '22 04:09 github-actions[bot]

@vishweshbankwar Hey I think this PR might have broken stuff. I'm testing the AspNetCore instrumentation using the example app. Not seeing any spans when running in net6.0. Took me a while but I got here:

image

Looks like a mismatch from what is being used vs what is defined?

CodeBlanch avatar Sep 29 '22 20:09 CodeBlanch