markus icon indicating copy to clipboard operation
markus copied to clipboard

sphinx extension for documenting keys used

Open willkg opened this issue 7 years ago • 2 comments

Markus should have a sphinx extension that makes it easier to document the keys in use, link to them in the docs, and spit out a listing of all the documented keys.

Maybe something like this:

.. markus:metric:: widget.count
   :type: count

   This key counts the number of widgets made.
... markus:metricslist::
:markus:metric:`widget.count`

willkg avatar Apr 08 '17 12:04 willkg

It'd be great if this was discoverable by Markus, too, but I'm not sure how that could work.

With Everett, we centralize configuration into a component and then you can autodocument that component and that fleshes it all out and works super.

With Markus, there's no centralizing of generated metrics. Maybe we should make one? Maybe there are better ways to deal with discovery and registration?

willkg avatar May 15 '17 15:05 willkg

I'm experimenting with a RegisteredMetricsFilter that lets you define what metrics should be emitted. Then you can use it as a filter and have it warn whenever a metric is emitted with a key that isn't registered or has a bad type. This would cover both validating metrics as well as autodocumenting them.

willkg avatar Oct 16 '19 21:10 willkg