mirror of
https://github.com/tahoe-lafs/tahoe-lafs.git
synced 2025-06-21 16:39:38 +00:00
OpenMetrics: Add docstring
This commit is contained in:
@ -1554,6 +1554,12 @@ class Statistics(MultiFormatResource):
|
|||||||
|
|
||||||
@render_exception
|
@render_exception
|
||||||
def render_OPENMETRICS(self, req):
|
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")
|
req.setHeader("content-type", "application/openmetrics-text; version=1.0.0; charset=utf-8")
|
||||||
stats = self._provider.get_stats()
|
stats = self._provider.get_stats()
|
||||||
ret = []
|
ret = []
|
||||||
|
Reference in New Issue
Block a user