Hi,
the struct PrometheusMetricsHandler implements actix_web::Handler.
It constructs an HttpResponse here:
|
fn call(&self, _req: actix_web::HttpRequest) -> Self::Future { |
|
Box::pin(future::ok(actix_web::HttpResponse::with_body( |
|
StatusCode::OK, |
|
self.metrics(), |
|
))) |
|
} |
I think this header should have a Content-Type field as explained here: https://prometheus.io/docs/instrumenting/exposition_formats/.
(I.e. content-type: text/plain)
It seems that this became a real issue with Prometheus 3: prometheus/prometheus#15485.
I don't have a full overview of the ecosystem yet, so I hope this is the right place.
If you want I could make a PR for this.
Cheers
Hi,
the struct
PrometheusMetricsHandlerimplementsactix_web::Handler.It constructs an
HttpResponsehere:actix-web-opentelemetry/src/middleware/metrics.rs
Lines 348 to 353 in a883322
I think this header should have a
Content-Typefield as explained here: https://prometheus.io/docs/instrumenting/exposition_formats/.(I.e.
content-type: text/plain)It seems that this became a real issue with Prometheus 3: prometheus/prometheus#15485.
I don't have a full overview of the ecosystem yet, so I hope this is the right place.
If you want I could make a PR for this.
Cheers