Skip to content

Commit

Permalink
Merge pull request #20 from G-Research/SREWRK-1440-tracing-more-details
Browse files Browse the repository at this point in the history
Increase details of thanos-rr trace
  • Loading branch information
kradalby authored Feb 10, 2021
2 parents e3da42d + e14286d commit f1c0e1f
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,9 @@ type HTTPError struct {

func (api *API) remoteRead(w http.ResponseWriter, r *http.Request) error {
ctx := r.Context()
span := trace.SpanFromContext(ctx)
tracer := otel.Tracer("")
var span trace.Span
ctx, span = tracer.Start(ctx, "remoteRead")
defer span.End()

compressed, err := ioutil.ReadAll(r.Body)
Expand Down Expand Up @@ -197,7 +199,9 @@ func (c AggrChunkByTimestamp) Swap(i, j int) { c[i], c[j] = c[j], c[i] }
func (c AggrChunkByTimestamp) Less(i, j int) bool { return c[i].MinTime < c[j].MinTime }

func (api *API) doStoreRequest(ctx context.Context, req *prompb.ReadRequest, ignoredSelector map[string]struct{}) (*prompb.ReadResponse, error) {
span := trace.SpanFromContext(ctx)
tracer := otel.Tracer("")
var span trace.Span
ctx, span = tracer.Start(ctx, "doStoreRequest")
defer span.End()

response := &prompb.ReadResponse{}
Expand Down

0 comments on commit f1c0e1f

Please sign in to comment.