diff options
author | Quang-Minh Nguyen <qmnguyen@gitlab.com> | 2023-02-20 13:08:57 +0300 |
---|---|---|
committer | Quang-Minh Nguyen <qmnguyen@gitlab.com> | 2023-02-22 18:45:32 +0300 |
commit | 027a6c871b58e04e8c41edad8285b1e2dd5a9dd4 (patch) | |
tree | 7d86d3b32efa7dd06c462902b0ce7da466990031 /cmd | |
parent | 9739d33f14ec2a21e0aa1a99ca3883183f4a4178 (diff) |
tracing: Replace opentracing calls by new tracing.StartSpan* helpers
In the prior commit, some new utility methods were implemented to wrap
around tracing libraries. This commit replaces the existing calls to
opentracing library by new methods. Some some advanced usage still holds
references to opentracing, though.
Diffstat (limited to 'cmd')
-rw-r--r-- | cmd/gitaly/main.go | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/cmd/gitaly/main.go b/cmd/gitaly/main.go index 2577b1c02..acc068cac 100644 --- a/cmd/gitaly/main.go +++ b/cmd/gitaly/main.go @@ -9,7 +9,6 @@ import ( "time" "github.com/go-enry/go-license-detector/v4/licensedb" - "github.com/opentracing/opentracing-go" "github.com/prometheus/client_golang/prometheus" "github.com/prometheus/client_golang/prometheus/promauto" log "github.com/sirupsen/logrus" @@ -45,10 +44,11 @@ import ( "gitlab.com/gitlab-org/gitaly/v15/internal/middleware/limithandler" "gitlab.com/gitlab-org/gitaly/v15/internal/streamcache" "gitlab.com/gitlab-org/gitaly/v15/internal/tempdir" + "gitlab.com/gitlab-org/gitaly/v15/internal/tracing" "gitlab.com/gitlab-org/gitaly/v15/internal/version" "gitlab.com/gitlab-org/labkit/fips" "gitlab.com/gitlab-org/labkit/monitoring" - "gitlab.com/gitlab-org/labkit/tracing" + labkittracing "gitlab.com/gitlab-org/labkit/tracing" "google.golang.org/grpc" ) @@ -126,7 +126,7 @@ func configure(configPath string) (config.Cfg, error) { sentry.ConfigureSentry(version.GetVersion(), sentry.Config(cfg.Logging.Sentry)) cfg.Prometheus.Configure() - tracing.Initialize(tracing.WithServiceName("gitaly")) + labkittracing.Initialize(labkittracing.WithServiceName("gitaly")) preloadLicenseDatabase() return cfg, nil @@ -146,7 +146,7 @@ func run(cfg config.Cfg) error { ctx, cancel := context.WithCancel(context.Background()) defer cancel() - bootstrapSpan, ctx := opentracing.StartSpanFromContext(ctx, "gitaly-bootstrap") + bootstrapSpan, ctx := tracing.StartSpan(ctx, "gitaly-bootstrap", nil) defer bootstrapSpan.Finish() if cfg.RuntimeDir != "" { |