-
Notifications
You must be signed in to change notification settings - Fork 800
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
add complete documentation #1045
Comments
After reading the code I found So the actual problem seems rather that the whole Python module is basically not documented at all. https://prometheus.github.io/client_python/ can at best count as a quick how-to, but even that doesn't seem to cover the most simplest and probably regularly used stuff (like clearing time series with labels that no longer exist), not to talk about general concepts like the registries or proper documentation of all classes, methods and their params. :-( |
Re-dedicating this issue, asking for some more complete documentation ;-) |
Another area that seems completely undocumented is The example given at https://prometheus.github.io/client_python/collector/custom/ doesn't even work, as There's no telling that CustomCollectors are automatically called (and do their thing in No word about what
I one wants to do both, then it seems (I had to gather all that information from blogs and 3rd party websites... all doing things a bit different... some making Having basically no proper documentation is really a pity, as the Python client seems actually to be quite neat, but if people have to read the whole sources or try their luck on google with questionable outcome, they probably simply won't use all the nice features in a proper way. |
#1021 is another issue focusing on API documentation that would hopefully make things like I hesitate to have an issue for just "complete documentation" since that is a moving target as more features are added. |
It's at least difficult IMO to have many small issues for just single points that seem to be missing from the documentation, because if I add another issue for every thing I find presumably missing, I'd spam the issue tracker ;-) Like there was the point of It would further e.g. be nice to document that:
Another thing, which lacks documentation is IMO, what And there are many little bits and pieces:
And at least I'm kinda lacking some more concrete best-practises on how do design metrics. I know there are a few documents on that, but they're rather very abstract IMO. |
What's IMO also confusing is: My understanding was that each object of e.g. Edit:
I would interpret this as e.g. Also, it's unclear why/when one would use |
Yet another ;-) ... part that should IMO be documented is the following: With direct instrumentation the typical usage seems to be:
With custom collectors, one could, too do something like above e.g. as in:
where I create one But the outcome of that is at best unexpected: First scrape:
Second scrape:
Third scrape:
Seems like it would just store all the samples and print all... even for the same metric+labelset combinations. Instead, it seems, that – unlike with the direct instrumentation usage – one has to always re-create the metric objects like in:
in order to get reasonable results. |
Hey.
It would be nice if there was something like a
write_to_stdout()
function, or ifwrite_to_textfile()
would somehow allow writing to stdout.For debugging that would seem to be much more helpful. Also, distros may have their own unified means of collecting the
.prom
files and thus even in production it may make sense to let a program simply write the metrics to stdout.Cheers,
Chris.
PS: Using
/dev/stdout
doesn't work, as it tries to write it's tmpfile there.The text was updated successfully, but these errors were encountered: