Description
Is your feature request related to a problem? Please describe.
As part of integrating Honeycomb and open telemetry in - https://github.com/netlify/build - we've spotted there's a set of console warnings that always show up when initialising the SDK:
honeycomb-opentelemetry-node/src/honeycomb-options.ts
Lines 108 to 126 in ed5b096
We're using an open telemetry collector which exports traces to Honeycomb directly, however we would still like to leverage the packaged spanProcessor
, traceExporter
, etc. that the @honeycombio/opentelemetry-node
module exports.
honeycomb-opentelemetry-node/src/opentelemetry-node.ts
Lines 15 to 32 in ed5b096
These warnings however won't let us use the SDK directly in prod since our process execution is customer facing and so are the logs it produces (including the warnings mentioned above ☝️) and for which we have no control over.
Describe the solution you'd like
Having a way to optionally disable the logs? Either by only logging when opts.debug === true
or by having a specific flag we could check? (e.g. opts.skipOptionsValidation
or something like that)
Describe alternatives you've considered
I guess we can manually setup our own NodeSDK
and potentially use the components this module exports directly, something like (still struggling with some type incompatibilies which I think are related with the versions imported):
Nevertheless I think it's extra setup work we could bypass if we had a way to bypass the warning logs 👍
Additional context