mirror of
https://github.com/prometheus/prometheus.git
synced 2025-03-05 20:59:13 -08:00
Use more informative error msg for timeouts on remote read
Signed-off-by: Jeanette Tan <jeanette.tan@grafana.com>
This commit is contained in:
parent
2ef8706c27
commit
63e66694f0
|
@ -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()
|
||||
|
|
Loading…
Reference in a new issue