You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi @wcarmon, I worked on adding support for getting the context into the Event. I believe that #559 has resolved this. The caveat is that you will have to pass the ctx in: log.Info().Ctx(ctx).Msg("foo"), and you will need to write a Hook which does this and add it to your logger.
Is there an idiomatic way to access context.Context from an Event?
My goal is to support OpenTelemetry's
span.AddEvent(...)
seamlessly(eg. if a
span
is inctx
,log.Info().Msg("foo")
should invokespan.AddEvent(...)
)The text was updated successfully, but these errors were encountered: