cloudflare / gortr

The RPKI-to-Router server used at Cloudflare
https://rpki.cloudflare.com
BSD 3-Clause "New" or "Revised" License
309 stars 39 forks source link

Always expose rpki_refresh metrics for sucessful http calls #106

Closed BarbarossaTM closed 1 year ago

BarbarossaTM commented 1 year ago

For successful HTTP calls there were cases where no rpki_refresh metric was exposed, as FetchFile() return'ed without the bool return value set to true.

As the bool return value mainly seems to indicate that a file was successfully fetch from an HTTP URL, the same behavior can be achieve by using the HTTP status code to expose the metric.

This also contains some drive-by clean-ups.