-
Notifications
You must be signed in to change notification settings - Fork 598
Description
I recently upgraded from 0.26 -> 0.28 and found that the global error handler has been removed: #2260 in favor of Tokio tracing logging.
That's great, however there are at least a few pain points:
Various things logged at info level that don't need to be: Ex here and here (and many other places). I would argue there is next to no reason for a library like this to log at info level. This example is maybe appropriate, but pretty much any consumer is not going to be interested in lifecycle events like the others.
The new thread for metrics export here will never log properly unless the global tracing subscriber is set. I am a library author consuming this library. I can't set a global subscriber, because my users might want to. However, I do want the subscriber my users tell me to use to be set as the subscriber my dependencies, like otel use. Normally this isn't a problem because I make sure all threads I spawn set the configured subscriber, but I can't control the subscriber for this (or any other) thread spawned internally by otel. It would be great if there was a way to configure the subscriber for exporters, so that it would be used by any spawned threads.
Lastly, I had a test in my code that was ensuring users would see internal ERROR level logs from otel about things they are very likely to care about (namely, failures to export metrics). AFAICT, even when I set a global trace subscriber, I'm seeing no such errors any more. This is the test as it functioned in 0.26, saw this one in particular, and I never see that now.