fix: report bind_recursive_clients as a gauge - #288
Open
SaiPisey2 wants to merge 1 commit into
Open
Conversation
BIND reports RecursClients in the same statistics counters as the running totals, and the exporter typed every entry of serverMetricStats as a counter. RecursClients is the number of recursive clients currently being served, so it goes up and down and is a gauge. The metric name already reflects that: every other entry in the map ends in _total, and this one does not. Type the entries explicitly and mark RecursClients as a gauge. The sample value is unchanged, only the reported type. Rates computed over it were meaningless before this, since the series is not monotonic. Asserts the type in the exporter tests, which previously only covered the sample line. Signed-off-by: SaiPisey2 <piseysai0202@gmail.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #98
bind_recursive_clientsis the number of recursive clients currently being served, so it goes up and down. It was reported as a counter.The cause is that
RecursClientslives inserverMetricStats, and the emission loop typed every entry in that map asCounterValue. Every other entry in the map is a real total and ends in_total; this one doesn't, so the name was already right and only the type was wrong.This marks
RecursClientsas a gauge and types the map entries explicitly. Sample values are unchanged.Same kind of fix as
[BUGFIX] Fix Gauge type for large gauges #90, so I've treated it as a bugfix rather than a breaking change.rate()over this series was never meaningful anyway, since it isn't monotonic.The tests only asserted the sample line, so I added the type assertion too. It fails on master with
# TYPE bind_recursive_clients counterand passes with the change.