Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This reduces warnings from the OpenTelemetry package:
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:
We use pino to log to stdout so we're not missing a lot of useful info about the way it runs
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
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.
Wrap the Reliability Kit logger:
We have been losing information from the OpenTelemetry internal logs because they log multiple messages in a row which pino/reliability kit does not support. We don't support this because we want to maintain consistency with n-logger.
To fix this, we need to wrap the Reliability Kit logger and extract any extra logged information into a new property. I've gone with
details
. Testing this locally, it's not common to get any info but it's important when we do get it - it helped me debug the issue with loading Pino ahead of instrumentation.Manually provide a meter to
HostMetrics
This suppresses an annoying warning. The host metrics class already gets the global meter provider in the same way but logs a warning if it has to. This is a lot of noise in our logs.
What it doesn't do:
Accessing resource attributes before async attributes settled
, we'll wait to see what happens with this issue