jzelinskie / cobrautil

A collection of utility functions when using Cobra.
https://github.com/jzelinskie/cobrautil
Apache License 2.0
5 stars 10 forks source link

make it possible to set zerolog as the logger for OpenTelemetry #16

Closed vroldanbet closed 2 years ago

vroldanbet commented 2 years ago

when a user misconfigures opentelemetry via cobrautil flags, the otel-go library will surface errorrs using stdout.

OTel offers API to set a custom logger that complies with the go-logr facade interface https://pkg.go.dev/go.opentelemetry.io/otel#SetLogger

it would be desirable to make it possible to set zerolog as the logger for OTel

jzelinskie commented 2 years ago

I think this package in general should just adopt go-logr. I tried instead to avoid logging altogether, but zerolog slipped in.

vroldanbet commented 2 years ago

Agreed, will close and open an issue to adopt logr