-
Notifications
You must be signed in to change notification settings - Fork 1
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
feat: more metrics #122
feat: more metrics #122
Conversation
@@ -109,6 +113,8 @@ pub async fn process_ppoi_message( | |||
messages: Vec<GraphcastMessage<PublicPoiMessage>>, | |||
callbook: &CallBook, | |||
) -> Result<RemoteAttestationsMap, AttestationError> { | |||
let start_time = Instant::now(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
would you explore a bit on how to use the metrics generated by the autometrics
macro?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In the interest of time I created an Issue for this, it will take more time since between the version we're using and 1.0.0 there are a fair amount of breaking changes in autometrics-rs.
#125
let most_attested_poi = sorted_remote_attestations.last().cloned(); | ||
|
||
if let Some(attestation) = &most_attested_poi { | ||
MAX_STAKE_POI |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ATTESTED_MAX_STAKE_WEIGHT
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
CACHED_PPOI_MESSAGES
is a gauge, Total Message Count is meant to be a running total of all the POI messages that have been processed, more like a counter, this might be instead theRECEIVED_MESSAGES
.- Thinking about
Divergence Rate = (DIVERGING_SUBGRAPHS / sum(CACHED_PPOI_MESSAGES)) * 100
again, I'm not sure how an user would interpret this number... I think there could be another metric in addition to track a counter of Comparison results labeled with deployment, then show a metrics on the rate ofresults counter / received messages
would you please also post a screenshot of the dashboard?
067b8ab
to
5604214
Compare
5604214
to
4933912
Compare
I will reopen this PR or create a new one with the changes when the memory leak is fixed |
Issue: #83
Metrics updates:
CACHED_PPOI_MESSAGES
, I thinkCACHED_PPOI_MESSAGES
for this, with this promql query on Grafanarate(cached_ppoi_messages[ $__rate_interval ])
AVERAGE_PROCESSING_TIME
that tracks the execution time ofprocess_ppoi_message
FREQUENT_SENDERS_COUNTER
, which is updated inprocess_ppoi_message
, presented in Grafana usingtopk(10, sum(rate(frequent_senders_counter[$__interval])) by (indexer_address))
CACHED_PPOI_MESSAGES
andDIVERGING_SUBGRAPHS
and this query(DIVERGING_SUBGRAPHS / sum(CACHED_PPOI_MESSAGES)) * 100
we can display the divergence rateLATEST_MESSAGE_TIMESTAMP
which also gets updated inprocess_ppoi_message
MAX_STAKE_POI
that gets updated incompare_attestations
when we get the most attested poi. Still mulling over the name though 🤔Other changes:
grafana.json