markus
markus copied to clipboard
sphinx extension for documenting keys used
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`
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?
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.