opencensus-go icon indicating copy to clipboard operation
opencensus-go copied to clipboard

Log correlation for Go

Open smthpickboy opened this issue 7 years ago • 1 comments

Is your feature request related to a problem? Please describe.

Log correlation draft: https://github.com/census-instrumentation/opencensus-specs/blob/master/trace/LogCorrelation.md Java implementation: https://github.com/census-instrumentation/opencensus-java/tree/master/contrib/log_correlation/log4j2

Since there's no dominant logging library in Golang(unlike Java), things are a bit more complicated here. So I wonder if there's a plan to implement log correlation for Go?

Describe the solution you'd like

Integrated contextual logging support for popular logging libraries like logrus, zap, etc.

Describe alternatives you've considered

Related issue: https://github.com/census-instrumentation/opencensus-specs/issues/130

smthpickboy avatar Oct 19 '18 03:10 smthpickboy

It would be great if this client supporting a Logger interface as a dependency. Something like

https://godoc.org/github.com/go-kit/kit/log

type Logger interface {
    Log(keyvals ...interface{}) error
}

That way you can pass in your needed logger (go-kit native logger) or an adapter for logrus, zap, etc.

ghostsquad avatar Mar 26 '19 16:03 ghostsquad