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

[wip] feat(metrics): Add label for main and other listeners #4739

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

Conversation

abhijat
Copy link
Contributor

@abhijat abhijat commented Mar 10, 2025

The stats collected per connection are divided according to main or other listener.

Metrics are decorated with labels listener= main or other.

fixes #4708

@abhijat abhijat force-pushed the abhijat/feat/label-for-main-listener branch 3 times, most recently from cfcc57c to 8139a83 Compare March 10, 2025 15:19
The stats collected per connection are divided according to main or
other listener.

Metrics are decorated with labels listener= main or other.

Signed-off-by: Abhijat Malviya <[email protected]>
@abhijat abhijat force-pushed the abhijat/feat/label-for-main-listener branch from 8139a83 to 6321b86 Compare March 10, 2025 15:20
@@ -700,14 +700,18 @@ void Connection::OnPostMigrateThread() {
}

stats_ = &tl_facade_stats->conn_stats;
++stats_->num_conns;
IsMain() ? ++stats_->num_conns_main : ++stats_->num_conns_other;
Copy link
Contributor

@BagritsevichStepan BagritsevichStepan Mar 10, 2025

Choose a reason for hiding this comment

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

Since it repeated several times I suggest return something like uint32_t& GetNumConns() and do ++GetNumConns() or --GetNumConns()

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.

some traffic metrics should be labeled as main/other
2 participants