-
Notifications
You must be signed in to change notification settings - Fork 619
fix: http.response_content_length does not get populated when ignoreNetworkEvents is set to true #2880
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
A fix to make sure the span events creation will not affect the attribute creation (e.g. http.response_content_length).
dyladan
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is just applying a fix accepted elsewhere. 🚀
|
Please add tests |
JamieDanielson
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for fixing this!
As Dan mentioned, just needs a test update. Also please run npm run lint to see the change needed to fix the failing status check. In fact you should be able to do npm run lint:fix and it will fix it for you.
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #2880 +/- ##
==========================================
+ Coverage 89.68% 89.73% +0.04%
==========================================
Files 187 187
Lines 9059 9059
Branches 1858 1858
==========================================
+ Hits 8125 8129 +4
+ Misses 934 930 -4 🚀 New features to boost your workflow:
|
Thanks, yes, ran lint:fix and fixed the formatting issue. |
Sure, added the test for this. Thanks. |
fix: http.response_content_length does not get populated when ignoreNetworkEvents is set to true
This PR fixes the issue #2879 where when the instrumentation is configured with
ignoreNetworkEventsset as true, the two attributes: http.response_content_length and http.response_content_length_compressed are also getting omitted, due to a logic flaw that did not call theaddSpanNetworkEventswhen the ignoreNetworkEvents were set to true.Regardless of whether ignoreNetworkEvents are set to true or false, the response content length should be returned to the resource fetch span, as it is not a part of network span events.
Fixes: #2879