This commit is contained in:
zenador 2025-03-05 22:45:30 +01:00 committed by GitHub
commit da690be4d4
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -375,7 +375,8 @@ func (c *Client) Read(ctx context.Context, query *prompb.Query, sortSeries bool)
httpReq.Header.Set("User-Agent", UserAgent)
httpReq.Header.Set("X-Prometheus-Remote-Read-Version", "0.1.0")
ctx, cancel := context.WithTimeout(ctx, c.timeout)
errTimeout := fmt.Errorf("request timed out after %s", c.timeout)
ctx, cancel := context.WithTimeoutCause(ctx, c.timeout, errTimeout)
ctx, span := otel.Tracer("").Start(ctx, "Remote Read", trace.WithSpanKind(trace.SpanKindClient))
defer span.End()