Skip to content

Commit

Permalink
feat: set metrics endpoint content type
Browse files Browse the repository at this point in the history
  • Loading branch information
btlghrants committed Dec 3, 2024
1 parent 6c63871 commit 98e613c
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/lib/controller/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -185,6 +185,8 @@ export class Controller {
*/
#metrics = async (req: express.Request, res: express.Response) => {
try {
// https://github.com/prometheus/docs/blob/main/content/docs/instrumenting/exposition_formats.md#basic-info
res.set("Content-Type", "text/plain; version=0.0.4");
res.send(await this.#metricsCollector.getMetrics());
} catch (err) {
Log.error(err, `Error getting metrics`);
Expand Down

0 comments on commit 98e613c

Please sign in to comment.