Skip to content
This repository has been archived by the owner on Aug 27, 2024. It is now read-only.

docs/tutorials/visualizing-node-metrics: Update to Prometheus endpoint #461

Merged
merged 2 commits into from
Feb 19, 2020

Conversation

mxinden
Copy link
Contributor

@mxinden mxinden commented Feb 18, 2020

The Grafana JSON endpoint exposed by Substrate is being removed in favor
of a new Prometheus endpoint. This patch updates the docs accordingly.

Do not merge before corresponding Substrate pull request is merged: paritytech/substrate#4511

The Grafana JSON endpoint exposed by Substrate is being removed in favor
of a new Prometheus endpoint. This patch updates the docs accordingly.
Comment on lines 66 to 68
As long as you're running a version of Substrate at or after commit
<!-- TODO: Update commit hash-->
[`d9ca975`](https://github.com/paritytech/substrate/commit/d9ca9750dba018463d59459a3ee1c03b71ea2d46),
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This PR is made against the next version of the docs. When we cut a new release, it will be included in that release. Thus there is no need to specify the commit here.

Comment on lines +16 to +40
+-----------+ +-------------+ +---------+
| Substrate | | Prometheus | | Grafana |
+-----------+ +-------------+ +---------+
| -----------------\ | |
| | Every 1 minute |-| |
| |----------------| | |
| | |
| GET current metric values | |
|<---------------------------------| |
| | |
| `substrate_peers_count 5` | |
|--------------------------------->| |
| | --------------------------------------------------------------------\ |
| |-| Save metric value with corresponding time stamp in local database | |
| | |-------------------------------------------------------------------| |
| | -------------------------------\ |
| | | Every time user opens graphs |-|
| | |------------------------------| |
| | |
| | GET values of metric `substrate_peers_count` from time-X to time-Y |
| |<-------------------------------------------------------------------------|
| | |
| | `substrate_peers_count (1582023828, 5), (1582023847, 4) [...]` |
| |------------------------------------------------------------------------->|
| | |
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe some of the designers can help us out with this? @goldsteinsveta

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is ultimately beautiful, but sure, I'll draw a scheme by the end of Friday

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

While I do agree that my diagram has a lot of room for improvement, I also want to emphasize the fact that one has to view it in markdown mode, otherwise tabs will not align properly.

This is ultimately beautiful

❤️

I'll draw a scheme by the end of Friday

🎉 @goldsteinsveta let me know if you need more details. I would expect the content to change a bit in the future, thus in case it is hard to do this in a way that is not easy to adapt, it might make sense to hold off a bit longer?

This patch removes the reference to the commit that introduces the
Prometheus metric endpoint.
@mxinden
Copy link
Contributor Author

mxinden commented Feb 19, 2020

@JoshOrndorff I removed the commit reference.

This PR is made against the next version of the docs.

I am not familiar with the release flow of this repository, so please let me know if I need to target another branch.


The corresponding Substrate pull request (paritytech/substrate#4511) merged. Should we go ahead with this one as well?

@riusricardo
Copy link
Contributor

I think that it should be ok to keep it in next.
The folder with the latest tutorials is: https://github.com/substrate-developer-hub/substrate-developer-hub.github.io/tree/source/website/versioned_docs/version-pre-v2.0-3e65111/tutorials
Could be that it didn't get to pre-2.0 because it wasn't indexed. This tutorial lives only in master.

Copy link
Contributor

@riusricardo riusricardo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@riusricardo
Copy link
Contributor

The trade-off here is that node-template will not work with this tutorial unless it is a new version. It will be compatible with the latest substrate node and Polkadot.

@JoshOrndorff
Copy link
Contributor

It is by design that this update lives only on next. This content is not relevant to the pre-v2.0-3e65111 because it doesn't yet have the features @mxinden is documenting. Anyone who clicks the link from substrate.dev/tutorials will still get the "old" content that matches the current node template. When we cut a new node template release, we will also cut a new docs release. Then the link from the tutorials page will point to this new content. I think this is exactly what we want.

@JoshOrndorff JoshOrndorff merged commit df10cc2 into polkadot-developers:source Feb 19, 2020
@riusricardo
Copy link
Contributor

riusricardo commented Feb 19, 2020

@JoshOrndorff
Copy link
Contributor

I see what you mean now. That's a feature of docusaurus https://docusaurus.io/docs/en/versioning#fallback-functionality I guess that particular tutorial didn't change at all between 1.0 and pre-2.0

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

Successfully merging this pull request may close these issues.

4 participants