mirror of
https://github.com/tahoe-lafs/tahoe-lafs.git
synced 2025-04-19 00:06:57 +00:00
OpenMetrics: Add docstring
This commit is contained in:
parent
c66ae302c8
commit
cbe5ea1115
@ -1554,6 +1554,12 @@ class Statistics(MultiFormatResource):
|
||||
|
||||
@render_exception
|
||||
def render_OPENMETRICS(self, req):
|
||||
"""
|
||||
Render our stats in `OpenMetrics <https://openmetrics.io/>` format.
|
||||
For example Prometheus and Victoriametrics can parse this.
|
||||
Point the scraper to ``/statistics?t=openmetrics`` (instead of the
|
||||
default ``/metrics``).
|
||||
"""
|
||||
req.setHeader("content-type", "application/openmetrics-text; version=1.0.0; charset=utf-8")
|
||||
stats = self._provider.get_stats()
|
||||
ret = []
|
||||
|
Loading…
x
Reference in New Issue
Block a user