feat: add structured histogram to status proto for up/down speeds#5058
Closed
feat: add structured histogram to status proto for up/down speeds#5058
Conversation
4 tasks
Member
Author
|
Closing in favour to #5059. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Checklist
Description
This PR adds metrics to the status protocol for analysing upload and download speeds on different nodes.
Upload and download speed metrics
Upload and download metrics for speed are new ones so that they are measuring only the /bzz uploads and downloads, not /bytes or any other POST methods, making them more specific than content api duration metric which aggregates measurements from all endpoints into one metric.
Status protocol fields
Structured approach (Histogram type)
This approach uses the structured histogram. This comes with a few drawbacks. One is the complexity and more important one is the inability to add vectors in such way because of the restrictions in the prometheus client for directly getting all labels form a vector metric.
Alternative (string field with all metrics)
To overcome both drawbacks, approach where all metrics are sent in a form of a string field in prometheus format. This is more flexible (easier to expose metrics) and convenient, but less transparent and less pretty by my opinion.
It is up for a discussion on both approaches.
Open API Spec Version Changes (if applicable)
TODO: add new fields to the status response.
Motivation and Context (Optional)
Related Issue (Optional)
#5005
Screenshots (if appropriate):