Skip to content
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

CCIP-5216 Tracking latencies and simplification in the metrics code #598

Merged
merged 15 commits into from
Feb 12, 2025

Conversation

mateusz-sekara
Copy link
Contributor

@mateusz-sekara mateusz-sekara commented Feb 12, 2025

Simplifying tracking metrics for the processors by:

  • reducing number of interfaces and moving stats to the struct
  • reducing number of method in the reporter
  • tracking metrics is done in the decorator (see TrackedProcessor), so plugin is less polluted with the observability stuff
  • any processor can add tracking of their observations and outcomes as long it's wrapped with TrackedProcessor

Additionally, tracking errors and latencies for the processor methods

@mateusz-sekara mateusz-sekara marked this pull request as ready for review February 12, 2025 13:19
@mateusz-sekara mateusz-sekara requested a review from a team as a code owner February 12, 2025 13:19
@mateusz-sekara mateusz-sekara changed the title Interfaces and wiring components together CCIP-5216 Tracking latencies and simplification in the metrics code Feb 12, 2025
Comment on lines +15 to +18
processorLabel = "merkleroot"
rootsLabel = "roots"
messagesLabel = "messages"
rmnSignatureLabel = "rmnSignatures"
Copy link
Contributor

@0xnogo 0xnogo Feb 12, 2025

Choose a reason for hiding this comment

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

Are the rootsLabel, messagesLabel, rmnSignatureLabel under the processorLabel? Meaning all the 3 labels will be dimensions of merkleroot metric?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I don't understand the question (btw these labels were there before, I'm only moving them from one place to another)

commit/metrics/prom.go Outdated Show resolved Hide resolved
Copy link
Contributor

@dimkouv dimkouv left a comment

Choose a reason for hiding this comment

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

Let's make sure we track durations for individual processor states.
E.g.

labels = {
   "plugin": "commit",
   "processor": "merkleRoots",
   "phase": "observation",
   "state": "buildingReport",
   "duration": x
}
labels = {
   "plugin": "exec",
   "phase": "observation",
   "state": "filtering"
   "duration": x
}

It is also useful to track the oracleID in this metrics.
Sometimes maybe a specific oracle has issues that contribute to high P99,P90 because the RPC they are using is slow.

@mateusz-sekara
Copy link
Contributor Author

It is also useful to track the oracleID in this metrics.
Sometimes maybe a specific oracle has issues that contribute to high P99,P90 because the RPC they are using is slow.

These are tracked automatically

Copy link

Metric detailed-metrics main
Coverage 74.7% 75.3%

@mateusz-sekara mateusz-sekara merged commit ab5458b into main Feb 12, 2025
17 checks passed
@mateusz-sekara mateusz-sekara deleted the detailed-metrics branch February 12, 2025 15:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants