Skip to content

logsource: make an aggregate input_window_full_total metric available on stats-level(1)#938

Merged
MrAnno merged 2 commits intoaxoflow:mainfrom
bazsi:logsource-remove-peer-address-label-on-statslevel2
Feb 4, 2026
Merged

logsource: make an aggregate input_window_full_total metric available on stats-level(1)#938
MrAnno merged 2 commits intoaxoflow:mainfrom
bazsi:logsource-remove-peer-address-label-on-statslevel2

Conversation

@bazsi
Copy link
Member

@bazsi bazsi commented Jan 30, 2026

Window related metrics are a debugging measure, so they have been available on stats-level(4), however the aggregate
of window-full events is interesting even on lower levels and a single time series is worth it to have it always available.

So this patch adds the ability to mask (or whiteout) a label from a StatsClusterKeyBuilder, so the associated logic can be
implemented in logsource.

bazsi added 2 commits January 30, 2026 13:40
This patch will allow labels to be overridden by subsequent options in
the key-builder stack. It's always the "first" value that overrides any
subsequent ones.

This also allows the removal of a label, by specifying the empty string
as a value.

Signed-off-by: Balazs Scheidler <[email protected]>
…er stats-levels

On stats-levels(2), we won't need connection level details on the
"window-full" counter, so let's create a shared metric that will not have
the "peer_address" or "connection" labels. This means that this is
an aggregate of window-full events across all of the connections of a
specific driver.

Signed-off-by: Balazs Scheidler <[email protected]>
@MrAnno
Copy link
Contributor

MrAnno commented Feb 2, 2026

We found issues related to this counter when they were aggregated; I don't remember the exact details, @mitzkia might remember.

We should probably check all call-sites and make sure we don't call stats_counter_set(), because that can cause underflows and completely invalid values.

Copy link
Contributor

@MrAnno MrAnno left a comment

Choose a reason for hiding this comment

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

We should get rid of set() calls if we want to aggregate these counters because they will overwrite each other's values.

@bazsi
Copy link
Member Author

bazsi commented Feb 3, 2026

We should get rid of set() calls if we want to aggregate these counters because they will overwrite each other's values.

If you mean these set() calls:

  stats_counter_set(self->metrics.window_available, window_size_counter_get(&self->window_size, NULL));
  stats_counter_set(self->metrics.window_capacity, self->full_window_size);

Then these are never applied to "shared" counters, as neither the capacity nor the window_available metrics are available below stats-level(4) and on those levels these metrics are connection specific.

Let me know if you disagree.

@bazsi bazsi requested a review from MrAnno February 3, 2026 19:34
Copy link
Contributor

@MrAnno MrAnno left a comment

Choose a reason for hiding this comment

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

Everything is fine then. Sorry for the confusion

@MrAnno MrAnno merged commit b2f5627 into axoflow:main Feb 4, 2026
22 checks passed
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