Skip to content

diskq/diskq-global-metrics: use metrics cache to keep counters alive#5073

Merged
HofiOne merged 2 commits intosyslog-ng:masterfrom
HofiOne:global-disk-buffer-metrics-fix
Aug 27, 2024
Merged

diskq/diskq-global-metrics: use metrics cache to keep counters alive#5073
HofiOne merged 2 commits intosyslog-ng:masterfrom
HofiOne:global-disk-buffer-metrics-fix

Conversation

@HofiOne
Copy link
Collaborator

@HofiOne HofiOne commented Aug 27, 2024

Depends on #5072

We do not show the orphaned metrics in the prometheus stats output. Registering, incrementing then unregistering
the counter makes it orphaned.

This can be solved with binding the lifecycle of the counters to the diskq_global_metrics instance.

No news file entry is needed, the counters disappeared after 4.7 was released.

Backport of #182 by @alltilla

@HofiOne HofiOne force-pushed the global-disk-buffer-metrics-fix branch from bcb0234 to 3ca7b03 Compare August 27, 2024 09:29
@HofiOne HofiOne marked this pull request as ready for review August 27, 2024 10:35
@HofiOne HofiOne force-pushed the global-disk-buffer-metrics-fix branch from 3ca7b03 to 9c8ac38 Compare August 27, 2024 12:17
We do not show the orphaned metrics in the prometheus
stats output. Registering, incrementing then unregistering
the counter makes it orphaned.

This can be solved with binding the lifecycle of the counters
to the diskq_global_metrics instance.

Signed-off-by: Attila Szakacs <[email protected]>
Signed-off-by: Hofi <[email protected]>
@HofiOne HofiOne force-pushed the global-disk-buffer-metrics-fix branch from 9c8ac38 to ef5592c Compare August 27, 2024 12:56
@HofiOne HofiOne merged commit b1138fb into syslog-ng:master Aug 27, 2024
@HofiOne HofiOne deleted the global-disk-buffer-metrics-fix branch August 27, 2024 13:29
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