Skip to content

Commit 3ce7a65

Browse files
authored
server: fix: /metrics endpoint returning JSON-escaped Prometheus format (#17386)
* fix: /metrics endpoint returning JSON-escaped Prometheus format * mod: remove string overload from ok() method
1 parent e072b20 commit 3ce7a65

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

tools/server/server.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2713,7 +2713,8 @@ struct server_routes {
27132713

27142714
res->headers["Process-Start-Time-Unix"] = std::to_string(res_task->t_start);
27152715
res->content_type = "text/plain; version=0.0.4";
2716-
res->ok(prometheus.str());
2716+
res->status = 200;
2717+
res->data = prometheus.str();
27172718
return res;
27182719
};
27192720

0 commit comments

Comments
 (0)