Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: set prometheus cont type #1501

Merged
merged 6 commits into from
Dec 3, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 @@
*/
#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");

Check warning on line 189 in src/lib/controller/index.ts

View check run for this annotation

Codecov / codecov/patch

src/lib/controller/index.ts#L189

Added line #L189 was not covered by tests
res.send(await this.#metricsCollector.getMetrics());
} catch (err) {
Log.error(err, `Error getting metrics`);
Expand Down
Loading