mirror of
https://github.com/open-policy-agent/opa.git
synced 2026-08-12 19:32:48 -06:00
download: Add timer to HTTP request
Signed-off-by: Torin Sandall <torinsandall@gmail.com>
This commit is contained in:
@@ -278,7 +278,9 @@ func (d *Downloader) download(ctx context.Context, m metrics.Metrics) (*download
|
||||
}
|
||||
}
|
||||
|
||||
m.Timer(metrics.BundleRequest).Start()
|
||||
resp, err := d.client.Do(ctx, "GET", d.path)
|
||||
m.Timer(metrics.BundleRequest).Stop()
|
||||
if err != nil {
|
||||
return nil, errors.Wrap(err, "request failed")
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user