Dabz / ccloudexporter

Prometheus exporter for Confluent Cloud API metric
https://docs.confluent.io/current/cloud/metrics-api.html
87 stars 53 forks source link

5xx response when querying telemetry api #72

Open vikaslalwani opened 3 years ago

vikaslalwani commented 3 years ago

When raised this issue with confluent support they simply asked to implement a retry mechanism, as recommended in the documentation. Is there a way this can be implemented in ccloudexporter?

{
"Endpoint": "https://api.telemetry.confluent.cloud//v1/metrics/cloud/query",
"StatusCode": 503,
"body": "upstream connect error or disconnect/reset before headers. reset reason: overflow",
"level": "error",
"msg": "Received invalid response",
"time": "2021-04-08T05:53:22Z"
}

{
"Endpoint": "https://api.telemetry.confluent.cloud//v1/metrics/cloud/query",
"StatusCode": 500,
"body": "{\"errors\":[{\"status\":\"500\",\"detail\":\"There was an error processing your request. It has been logged (ID xxxxxxxxxxxxxxx).\"}]}",
"level": "error",
"msg": "Received invalid response",
"time": "2021-04-08T05:59:30Z"
}
Dabz commented 3 years ago

Hi @vikaslalwani!

Thanks for the update, a retry mechanism could be nice indeed, let me think about it. It could make the exporter more robust, but it's something that needs to be done carefully.

I will try to implement this point in the next major iteration.

Thanks a lot for the input ;)