-
Notifications
You must be signed in to change notification settings - Fork 362
[AspNet.Telemetry] Fix end of time #3171
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
Conversation
src/OpenTelemetry.Instrumentation.AspNet.TelemetryHttpModule/ActivityDateTimeHelper.cs
Outdated
Show resolved
Hide resolved
src/OpenTelemetry.Instrumentation.AspNet.TelemetryHttpModule/ActivityDateTimeHelper.cs
Outdated
Show resolved
Hide resolved
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #3171 +/- ##
==========================================
- Coverage 69.92% 65.81% -4.12%
==========================================
Files 439 418 -21
Lines 16939 15853 -1086
==========================================
- Hits 11844 10433 -1411
- Misses 5095 5420 +325
Flags with carried forward coverage won't be shown. Click here to find out more.
🚀 New features to boost your workflow:
|
|
@jordankay13, could you please check changes from this PR? You should be able to download alpha package from https://github.com/open-telemetry/opentelemetry-dotnet-contrib/actions/runs/18277611950?pr=3171 or compile it locally. |
Thanks for this! I have a bit more work to do to get on the new TelemetryHttpModule contract (we aren't using the AspNet instrumentation so removing the Activity creation causes some minor headaches -- this PR motivates me to get on latest TelemetryHttpModule, so I'll let you know when I get to it). FWIW - we put this same fix into our app last week and overwrote the span EndTime in the OnRequestStoppedCallback and we noticed a huge improvement, so I have no reason to doubt the code in this PR. |
Sorry for that, your problems are probably related to #3151. Needed to make both packages stable. If you do not care about attributes/otel. semantic convention, you can just create your acivity in any way you want. |
Fixes #3166
Changes
[AspNet.Telemetry] Fix end of time by utilizing implementation from https://github.com/dotnet/runtime/blob/75662173e3918f2176b74e467dc8e41d4f01d4d4/src/libraries/System.Diagnostics.DiagnosticSource/src/System/Diagnostics/Activity.DateTime.netfx.cs
Alternative approach - use some reflection/delegates to call internally visible methods.
Merge requirement checklist
[ ] Unit tests added/updatedCHANGELOG.mdfiles updated for non-trivial changes[ ] Changes in public API reviewed (if applicable)