Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

sphinx extension for documenting keys used #8

Open
willkg opened this issue Apr 8, 2017 · 2 comments
Open

sphinx extension for documenting keys used #8

willkg opened this issue Apr 8, 2017 · 2 comments

Comments

@willkg
Copy link
Owner

willkg commented Apr 8, 2017

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
Copy link
Owner Author

willkg commented May 15, 2017

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
Copy link
Owner Author

willkg commented Oct 16, 2019

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant