Skip to content

Commit 4274b35

Browse files
committed
Make /metrics compatible with Prometheus 3.x
1 parent 7179981 commit 4274b35

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/server.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -384,6 +384,7 @@ async fn handler(
384384
let response = match segments[..] {
385385
["metrics"] => Response::builder()
386386
.status(StatusCode::OK)
387+
.header(hyper::header::CONTENT_TYPE, "text/plain; version=0.0.4; charset=utf-8")
387388
.body(Body::from(metrics.render()))
388389
.unwrap(),
389390
["shard-count"] => {

0 commit comments

Comments
 (0)