-
Notifications
You must be signed in to change notification settings - Fork 534
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
test(instr-document-load): fix test to allow missing network span events #2145
test(instr-document-load): fix test to allow missing network span events #2145
Conversation
The change in open-telemetry/opentelemetry-js#4486 means that a addSpanNetworkEvent() in v1.24.0 and later might get dropped -- if its time value is before the fetchStart time. Typically this happens if the event time value is 0.
This should fix the browser-test failure on #2091 |
This was written to have the test pass with sdk-trace-web versions before and after 1.24.0 where the change in behaviour happened, because instr-documentation-load has this dep: to test it
Then test with the newer sdk-trace-web:
|
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #2145 +/- ##
==========================================
- Coverage 90.97% 90.35% -0.63%
==========================================
Files 146 147 +1
Lines 7492 7679 +187
Branches 1502 1575 +73
==========================================
+ Hits 6816 6938 +122
- Misses 676 741 +65 |
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 picking this up so quickly! This looks like a better solution than what I was thinking, which was just to set the unloadEventStart
and unloadEventEnd
to 1571078170306
(one tick higher than fetchStart
)
The change in open-telemetry/opentelemetry-js#4486
means that a addSpanNetworkEvent() in v1.24.0 and
later might get dropped -- if its time value is before the fetchStart time.
Typically this happens if the event time value is 0.