mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
Tracing: Only enable traces to profiles for api servers for now (#89126)
This commit is contained in:
parent
636910e57e
commit
1abaa825c6
@ -272,7 +272,9 @@ func (ots *TracingService) initOpentelemetryTracer() error {
|
||||
}
|
||||
}
|
||||
|
||||
tp = NewProfilingTracerProvider(tp)
|
||||
if ots.cfg.ProfilingIntegration {
|
||||
tp = NewProfilingTracerProvider(tp)
|
||||
}
|
||||
|
||||
// Register our TracerProvider as the global so any imported
|
||||
// instrumentation in the future will default to using it
|
||||
|
@ -21,6 +21,8 @@ type TracingConfig struct {
|
||||
|
||||
ServiceName string
|
||||
ServiceVersion string
|
||||
|
||||
ProfilingIntegration bool
|
||||
}
|
||||
|
||||
func ProvideTracingConfig(cfg *setting.Cfg) (*TracingConfig, error) {
|
||||
|
@ -109,6 +109,7 @@ func (o *TracingOptions) ApplyTo(config *genericapiserver.RecommendedConfig) err
|
||||
tracingCfg.Sampler = o.SamplerType
|
||||
tracingCfg.SamplerParam = o.SamplerParam
|
||||
tracingCfg.SamplerRemoteURL = o.SamplingServiceURL
|
||||
tracingCfg.ProfilingIntegration = true
|
||||
|
||||
ts, err := tracing.ProvideService(tracingCfg)
|
||||
if err != nil {
|
||||
|
Loading…
Reference in New Issue
Block a user