Skip to content

Commit 52302ed

Browse files
committed
fix: disable the pino instrumentation
The pino instrumentation is causing us issues because we import our logger before the instrumentation can happen. It's logging an obnoxious warning. I think this is fine to disable because: 1. We use pino to log to stdout so we're not missing a lot of useful info about the way it runs 2. The instrumentation only adds traces, not metrics. We run pino async so it doesn't block further execution and shouldn't impact the timings of the routes etc that use it 3. By default, this instrumentation tries to use the OpenTelemetry logs SDK. I'd rather not load some stuff that we don't want to use.
1 parent 7ef89b7 commit 52302ed

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

packages/opentelemetry/lib/config/instrumentations.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,9 @@ exports.createInstrumentationConfig = function createInstrumentationConfig() {
2828
},
2929
'@opentelemetry/instrumentation-fs': {
3030
enabled: false
31+
},
32+
'@opentelemetry/instrumentation-pino': {
33+
enabled: false
3134
}
3235
}),
3336
new RuntimeNodeInstrumentation()

packages/opentelemetry/test/unit/lib/config/instrumentations.spec.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,9 @@ describe('@dotcom-reliability-kit/opentelemetry/lib/config/instrumentation', ()
4141
},
4242
'@opentelemetry/instrumentation-fs': {
4343
enabled: false
44+
},
45+
'@opentelemetry/instrumentation-pino': {
46+
enabled: false
4447
}
4548
});
4649
});

0 commit comments

Comments
 (0)