Skip to content

Commit

Permalink
Merge pull request #3237 from autonomys/add-metrics-content-type
Browse files Browse the repository at this point in the history
Add `Content-Type` HTTP header to metrics
  • Loading branch information
nazar-pc authored Nov 15, 2024
2 parents d0dd634 + 6f396e2 commit 4d0fa55
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion shared/subspace-metrics/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,9 @@ async fn metrics(registry: Data<RegistryAdapter>) -> Result<HttpResponse, Box<dy
}
}

let resp = HttpResponse::build(StatusCode::OK).body(encoded_metrics);
let resp = HttpResponse::build(StatusCode::OK)
.content_type("application/openmetrics-text; version=1.0.0; charset=utf-8")
.body(encoded_metrics);

Ok(resp)
}
Expand Down

0 comments on commit 4d0fa55

Please sign in to comment.