willholley opened a new pull request, #4475:
URL: https://github.com/apache/couchdb/pull/4475

   ## Overview
   
   The `/_node/_local/_prometheus` is missing `# TYPE` annotations for
   some metrics. In addition, it contains no `# HELP` annotations, which
   are useful particularly where metrics do not strictly match those
   returned by the `_stats` or `_system` endpoints.
   
   This PR adds the missing `# TYPE` annotations and adds `# HELP` annotations
   to all metrics.
   
   The spec for the prometheus text format is at
   
https://github.com/prometheus/docs/blob/main/content/docs/instrumenting/exposition_formats.md,
   for reference.
   
   ## couch_prometheus_util:to_prom/3
   
   `couch_prometheus_util:to_prom/3` is replaced by 
`couch_prometheus_util:to_prom/4`
   which now expects a description alongside the metric name and type.
   
   ## couch_prometheus_util:couch_to_prom/3
   
   `couch_prometheus_util:couch_to_prom/3` now extracts the metrics
   description from the object returned for each metric by `couch_stats`.
   In some cases, where the metrics are transformed e.g. from multiple
   metrics to a single metric with a tag, the description is explicitly
   changed to be more generic.
   
   ## Testing recommendations
   
   Unit tests are updated to expect the `# HELP` annotations alongside the `# 
TYPE` annotations for each metric.
   
   ## Related Issues or Pull Requests
   
   <!-- If your changes affect multiple components in different
        repositories please put links to those issues or pull requests here.  
-->
   
   ## Checklist
   
   - [ ] Code is written and works correctly
   - [ ] Changes are covered by tests
   - [ ] Any new configurable parameters are documented in 
`rel/overlay/etc/default.ini`
   - [ ] Documentation changes were made in the `src/docs` folder
   - [ ] Documentation changes were backported (separated PR) to affected 
branches
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to