Prometheus: add space after comment markers

I don't know anything about OCaml, so I am sorry if this is all wrong.

What

Update the formatting of Prometheus metric output to include spaces after # in HELP and TYPE comments, making the output match the OpenMetrics spec more consistent with standard Prometheus format.

Why

The metrics endpoint uses #HELP (no space after #) instead of # HELP (space after #). The space is part of the OpenMetrics spec and preventing some tools (such as the DataDog Agent) from scraping the metrics.

How

Change the string constants to include the space

Manually testing the MR

Checklist

  • Document the interface of any function added or modified (see the coding guidelines)
  • Document any change to the user interface, including configuration parameters (see node configuration)
  • Provide automatic testing (see the testing guide).
  • For new features and bug fixes, add an item in the appropriate changelog (docs/protocols/alpha.rst for the protocol and the environment, CHANGES.rst at the root of the repository for everything else).
  • Select suitable reviewers using the Reviewers field below.
  • Select as Assignee the next person who should take action on that MR

Merge request reports

Loading