docs: improve 'first steps' with data verification and metric discovery - #3035
docs: improve 'first steps' with data verification and metric discovery#3035Atharva-Ramawat wants to merge 2 commits into
Conversation
jan--f
left a comment
There was a problem hiding this comment.
Thanks, I think this improves things even though I have some change requests.
| As you can gather from http://localhost:9090/metrics, one metric that | ||
| Prometheus exports about itself is called | ||
| `promhttp_metric_handler_requests_total` (the total number of `/metrics` requests the Prometheus server has served). Go ahead and enter this into the expression console: | ||
| To see what metrics are available to query, you can use the **Metrics Explorer**. Click the globe icon next to the "Execute" button, which reveals a list of all metrics currently being scraped. Alternatively, you can start typing in the expression bar to trigger autocomplete suggestions. |
There was a problem hiding this comment.
The Metrics Explorer doesn't really tell you about available metrics. Checking the /metrics endpoint does that, so I'd prefer to keep the old wording here. Perhaps mention that the targets page also has a link to the metric endpoints being scraped.
Linking the query interface on localhost here as well is a good idea though.
There is a way to query prometheus for all metrics, but we should not add that to a first steps tutorial (or at all really) as this is a potentially DoS causing query. Hitting a particular metrics endpoint is much better.
| ## Saving queries (Recording Rules) | ||
|
|
||
| If you find yourself typing the same long queries repeatedly, Prometheus allows you to save them as **Recording Rules**. | ||
|
|
||
| Instead of re-evaluating a complex query every time you refresh a dashboard, a recording rule evaluates the query in the background on a schedule and saves the result as a brand new, pre-computed metric. This is essential for both performance and convenience as your monitoring infrastructure grows. | ||
|
|
||
| To learn how to configure your first saved query, read the [Recording rules documentation](/docs/prometheus/latest/configuration/recording_rules/). | ||
|
|
There was a problem hiding this comment.
Not sure we should add this in a first steps tutorial.
The convenience aspect of recording rules is perhaps also a bit overstated here.
Perhaps we should rather mention recording rules in /docs/introduction/overview, which is linked at the end of the document anyway.
|
Also please read https://prometheus.io/docs/guides/contributing/ |
- Revert to using /metrics endpoint for metrics discovery - Remove recording rules section from first steps tutorial - Add targets page verification step Signed-off-by: Atharva-Ramawat <atharvaramawat027@gmail.com>
|
Thanks for the feedback @jan--f! I've applied the requested changes: I reverted the metrics discovery to focus on the /metrics endpoint and completely removed the Recording Rules section. I added these fixes in a new commit and made sure to include my DCO sign-off there. Let me know if it looks good! |
Fixes #3032
Hi team! This PR addresses the friction points mentioned in issue #3032 for new users going through the "First Steps" guide.
I have added: