lablabs / cloudflare-exporter

Prometheus CloudFlare Exporter
Apache License 2.0
315 stars 104 forks source link

backfill missed data due to error from querying analytics #88

Open pciang opened 1 year ago

pciang commented 1 year ago

Description

We are occasionally seeing 0 request count minute-by-minute in cloudflarezone* timeseries as shown in the first screenshot below due to graphql: Internal server error. This PR backfills the missing data in the subsequent interval by taking into account the last minute that it was successful, in the GraphQL query. Request count would appear to have doubled in the next interval, as shown in the second screenshot, but in reality it actually accounts for the missing data in the previous interval. This does not implement a retry mechanism because CloudFlare has imposed a strict rate-limiting.

Screenshot 2023-02-28 at 21 11 04 Screenshot 2023-02-28 at 21 15 30
jay-kothari commented 1 year ago

Hello Team, Can someone please review this PR? This change will be super useful

jay-kothari commented 1 year ago

@martinhaus Can you please review and merge this?