As per https://prometheus.io/docs/instrumenting/writing_exporters/#failed-scrapes it's acceptable to return a 500 error in cases where the metric is unavailable (e.g. I'm scraping a service that doesn't have it's own exporter, and it might be down). Terminating the exporter and allowing it to be restarted works, but isn't very clean (and leaves a truncated response instead of a clean return code).
Is there a way to indicate this with prometheus_exporter? If not, what would be a prometheus_exporter-idiomatic way to extend it to support this?
As per https://prometheus.io/docs/instrumenting/writing_exporters/#failed-scrapes it's acceptable to return a 500 error in cases where the metric is unavailable (e.g. I'm scraping a service that doesn't have it's own exporter, and it might be down). Terminating the exporter and allowing it to be restarted works, but isn't very clean (and leaves a truncated response instead of a clean return code).
Is there a way to indicate this with prometheus_exporter? If not, what would be a prometheus_exporter-idiomatic way to extend it to support this?