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
This commit is contained in:
parent
e072b2052e
commit
3ce7a65c2f
|
|
@ -2713,7 +2713,8 @@ public:
|
||||||
|
|
||||||
res->headers["Process-Start-Time-Unix"] = std::to_string(res_task->t_start);
|
res->headers["Process-Start-Time-Unix"] = std::to_string(res_task->t_start);
|
||||||
res->content_type = "text/plain; version=0.0.4";
|
res->content_type = "text/plain; version=0.0.4";
|
||||||
res->ok(prometheus.str());
|
res->status = 200;
|
||||||
|
res->data = prometheus.str();
|
||||||
return res;
|
return res;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue