commercetools / mongodbatlas_exporter

MongoDB Atlas exporter for Prometheus
MIT License
13 stars 8 forks source link

fix registerer nil deref from errors #20

Closed Freyert closed 2 years ago

Freyert commented 2 years ago

When the registerer is scanning processes and there are a lot of processes to check 429s are inevitable.

If we hit a 429 when registering we would log a debug level message and then continue to try and register the process.

Adding a break statement cause it to skip registering the rate limited process and continue with others.

We need to add an exponential back off with jitter RoundTripper to handle this better.

Freyert commented 2 years ago

Tomorrow:

  1. Add a round tripper with exponential backoff and jitter
  2. Swap the break for a continue statement