-
Notifications
You must be signed in to change notification settings - Fork 812
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
feat(@opentelemetry-instrumentation-fetch): optionally ignore network events #3028
feat(@opentelemetry-instrumentation-fetch): optionally ignore network events #3028
Conversation
|
@gregolsen you'll need to add a entry in the global CHANGELOG, apart from that lgtm |
Codecov Report
@@ Coverage Diff @@
## main #3028 +/- ##
==========================================
- Coverage 92.65% 92.64% -0.02%
==========================================
Files 187 187
Lines 6167 6169 +2
Branches 1301 1303 +2
==========================================
+ Hits 5714 5715 +1
- Misses 453 454 +1
|
4f9feef
to
2a604f8
Compare
Ah, thank you @vmarchaud. I modified |
Yeah sorry that was exactly what i meant, thanks |
Which problem is this PR solving?
Summary: This PR allows to optionally disable adding network events as span events to control the total volume of telemetry data produced.
Some of the modern vendors treat spans and span events (annotations) equally – both are counted towards the overall retained events volume. Similarly, vendors that charge for the overall size of data retained will count span annotations as part of the data. Typically, span produced by the
@opentelemetry-instrumentation-fetch
includes 9 network events – 10 event items along with the span itself. It would be great to have ability to optionally disable network events being added as span annotations to reduce the overall volume of data/events generated and eventually retained.Short description of the changes
This PR adds an optional boolean flag
ignoreNetworkEvents
to theFetchInstrumentation
. When set totrue
network events are not added to the span.Type of change
Please delete options that are not relevant.
How Has This Been Tested?
Running
npm run test:browser
will run the newly added test as part of the suite:Checklist: