diff --git a/datastore/backend.go b/datastore/backend.go index b1c2546..2570df9 100644 --- a/datastore/backend.go +++ b/datastore/backend.go @@ -478,7 +478,7 @@ func (b *BackendDS) sendMetricsToBackend(r io.Reader) { return } - ctx, cancel := context.WithTimeout(context.Background(), 10*time.Second) + ctx, cancel := context.WithTimeout(b.ctx, 10*time.Second) defer cancel() resp, err := b.c.Do(req.WithContext(ctx))