From 07ff4648c0c705566a60d220338a24d029f9381e Mon Sep 17 00:00:00 2001 From: Mario Date: Wed, 29 Sep 2021 11:30:35 +0200 Subject: [PATCH] Set span.kind to client in query-frontend (#975) * Set span.kind to client in query-frontend * I was too slow * Use opentracing * Fix changelog --- CHANGELOG.md | 1 + modules/frontend/retry.go | 2 ++ 2 files changed, 3 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index fad92ada42b..d7c3fa5ccd1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -55,6 +55,7 @@ * [BUGFIX] Fix "magic number" errors and other block mishandling when an ingester forcefully shuts down [#937](https://github.com/grafana/tempo/issues/937) (@mdisibio) * [BUGFIX] Fix compactor memory leak [#806](https://github.com/grafana/tempo/pull/806) (@mdisibio) * [BUGFIX] Fix an issue with WAL replay of zero-length search data when search is disabled. [#968](https://github.com/grafana/tempo/pull/968) (@annanay25) +* [BUGFIX] Set span's tag `span.kind` to `client` in query-frontend [#975](https://github.com/grafana/tempo/pull/975) (@mapno) ## v1.1.0 / 2021-08-26 * [CHANGE] Upgrade Cortex from v1.9.0 to v1.9.0-131-ga4bf10354 [#841](https://github.com/grafana/tempo/pull/841) (@aknuds1) diff --git a/modules/frontend/retry.go b/modules/frontend/retry.go index cf050f648b7..1c4a0a1a632 100644 --- a/modules/frontend/retry.go +++ b/modules/frontend/retry.go @@ -5,6 +5,7 @@ import ( "net/http" "github.com/opentracing/opentracing-go" + "github.com/opentracing/opentracing-go/ext" ot_log "github.com/opentracing/opentracing-go/log" "github.com/prometheus/client_golang/prometheus" "github.com/prometheus/client_golang/prometheus/promauto" @@ -37,6 +38,7 @@ func (r retryWare) Do(req *http.Request) (*http.Response, error) { ctx := req.Context() span, ctx := opentracing.StartSpanFromContext(ctx, "frontend.Retry") defer span.Finish() + ext.SpanKindRPCClient.Set(span) // context propagation req = req.WithContext(ctx)