Undici instrumentation breaks fastify throughput tracking
See original GitHub issueDescription
We enabled undici instrumentation in our production and saw huge decrease in our service throughput, but all other KPIs were stable (which means the issue is the metric, the actual throughput didn’t drop)
We are using fastify with Node 16, our base NR configuration is
NEW_RELIC_FEATURE_FLAG_NEW_PROMISE_TRACKING=true
NEW_RELIC_FEATURE_FLAG_UNRESOLVED_PROMISE_CLEANUP=false
We enabled undici instrumentation (newrelic SDK v8.5.1) using these flags:
NEW_RELIC_FEATURE_FLAG_UNDICI_INSTRUMENTATION=true
NEW_RELIC_FEATURE_FLAG_UNDICI_ASYNC_TRACKING=false
this caused the first drop u see on the screenshot.
our next try was to set undici_asyn_tracking to “true”
NEW_RELIC_FEATURE_FLAG_UNDICI_INSTRUMENTATION=true
NEW_RELIC_FEATURE_FLAG_UNDICI_ASYNC_TRACKING=true
This change increased the throughput for a while after app restart, but then the throughput dropped again (this is the second drop on the screenshot)
after disabling undici instrumentation, throughput got back to normal.
Expected Behavior
I don’t see how an http client instrumentation(undici) in my service(fastify), can cause the throughput metric to get broken (as I mentioned the real throughput stayed the same, its just the metrics report that got broken)
Your Environment
Fastify v3.22.1 Node 16.11 undici 4.7.1
Issue Analytics
- State:
- Created 2 years ago
- Comments:14 (8 by maintainers)
@artur-ma Just wanted to give you a heads up that we’re considering work related to this in the upcoming roadmap. We don’t have a definitive timeline yet. I’ll update when we do. Thanks!
@artur-ma I tried saving references to the channels and ran our test and it is still an issue. However, that’s not to say your issue has not been resolved. The repro case we created is very brute force. So I’m going to make this suggested change and perhaps you could retest, or could you apply the patch below and test yourself without us releasing a version of the agent?
Commit Sha