chore(tracing): Initialize tracing early, before wire (#112007)
Signed-off-by: Dave Henderson <dave.henderson@grafana.com>
This commit is contained in:
@@ -11,9 +11,7 @@ import (
|
||||
"syscall"
|
||||
"time"
|
||||
|
||||
"github.com/grafana/grafana/pkg/services/featuremgmt"
|
||||
_ "github.com/grafana/pyroscope-go/godeltaprof/http/pprof"
|
||||
|
||||
"github.com/urfave/cli/v2"
|
||||
|
||||
"github.com/grafana/grafana/pkg/api"
|
||||
@@ -21,8 +19,10 @@ import (
|
||||
"github.com/grafana/grafana/pkg/infra/log"
|
||||
"github.com/grafana/grafana/pkg/infra/metrics"
|
||||
"github.com/grafana/grafana/pkg/infra/process"
|
||||
"github.com/grafana/grafana/pkg/infra/tracing"
|
||||
"github.com/grafana/grafana/pkg/server"
|
||||
"github.com/grafana/grafana/pkg/services/apiserver/standalone"
|
||||
"github.com/grafana/grafana/pkg/services/featuremgmt"
|
||||
"github.com/grafana/grafana/pkg/setting"
|
||||
)
|
||||
|
||||
@@ -111,6 +111,11 @@ func RunServer(opts standalone.BuildInfo, cli *cli.Context) error {
|
||||
return err
|
||||
}
|
||||
|
||||
// Initialize tracing early to ensure it's always available for other services
|
||||
if err := tracing.InitTracing(cfg); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
s, err := server.Initialize(
|
||||
cli.Context,
|
||||
cfg,
|
||||
|
||||
Reference in New Issue
Block a user