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

fix: do not alter original telemetry context pt.1 #546

Conversation

stijnmoreels
Copy link
Member

Fixes the first set of telemetry extensions w/ a telemetry context that does not alter the original passed-in context. Split in two parts as there are a lot of extensions/tests to be changed.

Relates to #545

@netlify
Copy link

netlify bot commented Oct 24, 2023

Deploy Preview for arcus-observability canceled.

Name Link
🔨 Latest commit e92c7ba
🔍 Latest deploy log https://app.netlify.com/sites/arcus-observability/deploys/653751fdffa1970008c6b976

@stijnmoreels stijnmoreels changed the title fix: do not alter telemetry ctx pt.1 fix: do not alter original telemetry context pt.1 Oct 24, 2023
@codecov
Copy link

codecov bot commented Oct 24, 2023

Codecov Report

Attention: 2 lines in your changes are missing coverage. Please review.

Comparison is base (14e17ad) 85.71% compared to head (e92c7ba) 87.53%.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #546      +/-   ##
==========================================
+ Coverage   85.71%   87.53%   +1.81%     
==========================================
  Files          71       71              
  Lines        3095     3081      -14     
  Branches      217      203      -14     
==========================================
+ Hits         2653     2697      +44     
+ Misses        365      312      -53     
+ Partials       77       72       -5     
Files Coverage Δ
...ons/Extensions/ILoggerHttpRequestDataExtensions.cs 100.00% <100.00%> (+100.00%) ⬆️
...tensions/ILoggerBlobStorageDependencyExtensions.cs 100.00% <100.00%> (ø)
...elemetry.Core/Extensions/ILoggerEventExtensions.cs 100.00% <100.00%> (ø)
...Core/Extensions/ILoggerHttpDependencyExtensions.cs 100.00% <100.00%> (+1.53%) ⬆️
...re/Extensions/ILoggerIotHubDependencyExtensions.cs 100.00% <100.00%> (+1.78%) ⬆️
...lemetry.Core/Extensions/ILoggerMetricExtensions.cs 100.00% <100.00%> (ø)
....Core/Extensions/ILoggerSqlDependencyExtensions.cs 98.31% <100.00%> (+2.48%) ⬆️
...ensions/ILoggerTableStorageDependencyExtensions.cs 100.00% <100.00%> (ø)
...nsions/ILoggerAzureKeyVaultDependencyExtensions.cs 69.09% <0.00%> (+24.26%) ⬆️
...emetry.Core/Extensions/ILoggerRequestExtensions.cs 72.64% <0.00%> (+1.81%) ⬆️

... and 1 file with indirect coverage changes

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@fgheysels
Copy link
Member

I was first wondering if we would have a test that verifies if the original context is not altered, and after reviewing some files, I indeed realized : "why should I even wonder" . Thanks for adding the additional test! :)

@stijnmoreels
Copy link
Member Author

I was first wondering if we would have a test that verifies if the original context is not altered, and after reviewing some files, I indeed realized : "why should I even wonder" . Thanks for adding the additional test! :)

Also simplified the telemetry context determination to a single location, so that it becomes easier to see where the context is 'copied from' or 'created anew'.
The test are mostly verifying these indeed, but I could have missed an overload in the process; hence why I simplified it, so that we know for sure that we're testing the same thing.

@stijnmoreels stijnmoreels merged commit 415964f into arcus-azure:main Oct 26, 2023
15 of 16 checks passed
@stijnmoreels stijnmoreels deleted the fix/do-not-alter-telemetrycontext-pt.1 branch October 26, 2023 13:45
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.

2 participants