Skip to content

Conversation

@ndr-ds
Copy link
Contributor

@ndr-ds ndr-ds commented Nov 19, 2025

Motivation

We should track operations and messages as well, not just transactions generically

Proposal

Add metrics for operations and messages

Test Plan

Deployed a network with this, saw the metrics

Release Plan

  • Nothing to do / These changes follow the usual release cycle.

@ndr-ds ndr-ds mentioned this pull request Nov 19, 2025
@ndr-ds ndr-ds requested review from Twey, afck, deuszx and ma2bd November 19, 2025 17:45
});

pub static OPERATION_COUNT: LazyLock<IntCounterVec> =
LazyLock::new(|| register_int_counter_vec("operation_count", "Operation count", &[]));
Copy link
Contributor

Choose a reason for hiding this comment

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

It doesn't need to be a _vec if we don't use labels.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

True, but I guess my thinking was: if we one day decide to add labels to this, will Prometheus keep the non-vec historical data logged to the same metric? That's why I've been using _vec everywhere 🤔
It seems actually that adding/removing labels creates an entirely new time series https://prometheus.io/docs/concepts/data_model/?metric-names-and-labels so we might as well drop the _vec

Copy link
Contributor

@afck afck left a comment

Choose a reason for hiding this comment

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

No blockers from my side, but @deuszx's comment should be addressed.

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.

4 participants