Skip to content

Commit

Permalink
fixup! probers: initiate traces for browser, scripted, and multihttp …
Browse files Browse the repository at this point in the history
…checks
  • Loading branch information
roobre committed Oct 9, 2024
1 parent 554ae93 commit 2973a75
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion internal/prober/browser/browser.go
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ func (p Prober) Name() string {
}

func (p Prober) Probe(ctx context.Context, target string, registry *prometheus.Registry, logger logger.Logger) (bool, float64) {
ctx, probeSpan := tracing.TracerProvider(ctx).Tracer("").Start(ctx, "browser check")
ctx, probeSpan := tracing.TracerProviderFromContext(ctx).Tracer("").Start(ctx, p.Name()+" check")
defer probeSpan.End()

success, err := p.processor.Run(ctx, registry, logger, p.logger)
Expand Down
2 changes: 1 addition & 1 deletion internal/prober/multihttp/multihttp.go
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ func (p Prober) Name() string {
}

func (p Prober) Probe(ctx context.Context, target string, registry *prometheus.Registry, logger logger.Logger) (bool, float64) {
ctx, probeSpan := tracing.TracerProvider(ctx).Tracer("").Start(ctx, "multihttp check")
ctx, probeSpan := tracing.TracerProviderFromContext(ctx).Tracer("").Start(ctx, p.Name()+" check")
defer probeSpan.End()

success, err := p.processor.Run(ctx, registry, logger, p.logger)
Expand Down
2 changes: 1 addition & 1 deletion internal/prober/scripted/scripted.go
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ func (p Prober) Name() string {
}

func (p Prober) Probe(ctx context.Context, target string, registry *prometheus.Registry, logger logger.Logger) (bool, float64) {
ctx, probeSpan := tracing.TracerProvider(ctx).Tracer("").Start(ctx, "scripted check")
ctx, probeSpan := tracing.TracerProviderFromContext(ctx).Tracer("").Start(ctx, p.Name()+" check")
defer probeSpan.End()

success, err := p.processor.Run(ctx, registry, logger, p.logger)
Expand Down

0 comments on commit 2973a75

Please sign in to comment.