We were moving our payment services’ provider metrics from New Relic to OpenTelemetry. To check the new data, I looked across the whole fleet instead of one service at a time, and three things looked wrong.
Three symptoms
| Symptom | Measured scope |
|---|---|
nodejs_eventloop_utilization pinned at exactly 1.000 | 12 of 203 services (25 of 596 series) |
Every HTTP span emitted twice, once with http.target and once with url.path | 16 services |
| Negative connection counts | not measured separately |
Each of these looks like a different problem. The event-loop value suggests a stuck process. The duplicate spans suggest instrumentation registered twice. The negative counts suggest a broken exporter. Your first instinct is to open three tickets.
The event loop that was always busy
A utilization of 1.000 that never moves, not even at 3 a.m., is not a busy service. It’s a calculation going wrong. Older versions of the runtime instrumentation computed the delta against a value that was never initialized, so they reported utilization since process start rather than over the last interval. The upstream fix shipped in instrumentation-runtime-node 0.34.0.
So the broken services were simply running an older copy, which raised the question of how 12 services ended up on it.
The duplicate spans
The duplicate spans were the expensive symptom. Throughput doubles while latency stays flat, so nothing looks broken. But any per-request cost you derive from those spans is silently cut in half. Two copies of the HTTP instrumentation were loaded in the same process, each emitting its own span with a different semantic-convention attribute.
Again, the cause was two versions where there should have been one.
The one cause
Our shared telemetry package had already aligned these dependencies on the right release line, so the fix had shipped once. But it declared them with caret ranges (^).
A caret range isn’t a version. Each consuming service resolves it in its own lockfile, at the moment that lockfile is written. The alignment held only for services installed on release day. Everyone else kept whatever their lockfile had pinned, sometimes before the upstream fix and sometimes with a duplicate copy pulled in through another path.
The runtime instrumentation made it worse because it was a transitive dependency, reachable only through the auto-instrumentations meta-package. A service installed before the fix kept the broken copy indefinitely, and nothing in its own package.json said so.
The fix
The change I proposed for the shared package:
- Pin the ten OpenTelemetry dependencies to exact versions: the ones the tree already resolved to.
- Make the runtime instrumentation a direct dependency at 0.34.0, so the fixed version reaches every consumer rather than depending on when each one last ran
npm install. - Pin the two packages whose ranges had drifted a minor version without anyone deciding it.
The package’s own lockfile didn’t change a single resolved version. It was 13 lines, all in the root dependency list. That confirms pinning didn’t change the tree; it only made it explicit.
The trade-off
With exact versions, patches no longer arrive by themselves, and that’s the point. A package whose whole job is to make telemetry comparable across a fleet gets more value from the same version everywhere than from an automatic patch nobody chose to take. Upgrades now happen in one place, on purpose, and reach services through a release of that package.
What pinning doesn’t fix by itself
Consumers still have to regenerate their lockfiles. Installing the new release on top of an existing package-lock.json keeps the stale transitive copies that were already pinned there. Without that step, the 12 services with the frozen event loop stay frozen. The rollout has two parts: release the package, then regenerate each service’s lockfile.
The lesson
When several unrelated-looking metrics break at once, check which versions are installed before checking any configuration. A shared dependency declared with a range is a promise only the first installer gets to keep.