mirror of
https://github.com/grafana/grafana.git
synced 2025-01-09 07:33:42 -06:00
K8s: fix tracer init by moving Config() above it (#90311)
This commit is contained in:
parent
a28db90dd5
commit
57e2a56876
@ -74,15 +74,17 @@ func newCommandStartExampleAPIServer(o *APIServerOptions, stopCh <-chan struct{}
|
||||
return err
|
||||
}
|
||||
|
||||
if o.Options.TracingOptions.TracingService != nil {
|
||||
tracer.InitTracer(o.Options.TracingOptions.TracingService)
|
||||
}
|
||||
|
||||
// o.Config(tracer) definitely needs to happen before we override the tracer below
|
||||
// using tracer.InitTracer with the real tracer
|
||||
config, err := o.Config(tracer)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
if o.Options.TracingOptions.TracingService != nil {
|
||||
tracer.InitTracer(o.Options.TracingOptions.TracingService)
|
||||
}
|
||||
|
||||
defer o.factory.Shutdown()
|
||||
|
||||
if err := o.RunAPIServer(config, stopCh); err != nil {
|
||||
|
Loading…
Reference in New Issue
Block a user