Skip to content

Autometrics #3

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

Autometrics #3

wants to merge 1 commit into from

Conversation

DavidVentura
Copy link

This PR implements metrics, as requested here, and code does look very nice, but:

1- autometrics is not maintained
2- The generated metrics are.. not great.

By not great I mean:

  • The metrics are counters, which means they are not present when the value is 0 (so the double_sign counter is missing most of the time) -- this makes writing alerts harder
  • The SLOs cannot be configured
  • We cannot add runtime labels to the metrics (eg: chain_id), so it's not clear for which chain the metrics are relevant -- they are only usable for the tmkms instance.

I would not merge this PR, it's here only to contrast #2

@DavidVentura DavidVentura requested a review from qezz December 17, 2024 11:24
Copy link

@qezz qezz left a comment

Choose a reason for hiding this comment

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

by any chance, do you have an example of a metric?

Comment on lines +21 to +33
const REQUEST_SLO: Objective =
Objective::new("validator-request").success_rate(ObjectivePercentile::P99_9);

const SIGN_SLO: Objective = Objective::new("sign-request")
.success_rate(ObjectivePercentile::P99_9)
.latency(ObjectiveLatency::Ms500, ObjectivePercentile::P99)
.latency(ObjectiveLatency::Ms1000, ObjectivePercentile::P99_9);

const GET_PUBKEY_SLO: Objective = Objective::new("pubkey-request")
.success_rate(ObjectivePercentile::P99_9)
.latency(ObjectiveLatency::Ms500, ObjectivePercentile::P99)
.latency(ObjectiveLatency::Ms1000, ObjectivePercentile::P99_9);

Copy link

Choose a reason for hiding this comment

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

ooh.. judging by https://docs.rs/autometrics/latest/autometrics/objectives/index.html, it's doing too much to my taste

i would personally not do this

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.

2 participants