Merge pull request #6003 from cpuguy83/add_otel_log_hook
Add open telemetry logging hook for logrus
This commit is contained in:
@@ -301,6 +301,8 @@ func applyFlags(context *cli.Context, config *srvconfig.Config) error {
|
||||
if err := setLogFormat(config); err != nil {
|
||||
return err
|
||||
}
|
||||
setLogHooks()
|
||||
|
||||
for _, v := range []struct {
|
||||
name string
|
||||
d *string
|
||||
@@ -366,6 +368,10 @@ func setLogFormat(config *srvconfig.Config) error {
|
||||
return nil
|
||||
}
|
||||
|
||||
func setLogHooks() {
|
||||
logrus.StandardLogger().AddHook(tracing.NewLogrusHook())
|
||||
}
|
||||
|
||||
func dumpStacks(writeToFile bool) {
|
||||
var (
|
||||
buf []byte
|
||||
|
||||
Reference in New Issue
Block a user