digitalocean / digitalocean/netbox-ip-controller

Count the actual number of http requests to NetBox instead of retried requests

Open
#13 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Go
Stars
32
Forks
3
PR merge metrics
No merged PRs in 30d

Description

Since http requests to NetBox use an http client with retries, the actual number of http requests can be bigger than the number of `client.Do()` invocations. This is relevant for
- rate-limiting
- metrics collection

Instead of on every `httpClient.Do()`, waiting (for rate-limiting) and incrementing total number of requests should happen in [RequestLogHook](https://pkg.go.dev/github.com/hashicorp/go-retryablehttp#RequestLogHook).

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.