perp-fees: delete gauges on asset_not_found (Lighter ghost metrics) - #1620
Closed
Flotapponnier wants to merge 1 commit into
Closed
perp-fees: delete gauges on asset_not_found (Lighter ghost metrics)#1620Flotapponnier wants to merge 1 commit into
Flotapponnier wants to merge 1 commit into
Conversation
Lighter removed BTC/ETH/SOL from their perp markets. The harness was returning asset_not_found on every tick but recordSample() returned early without deleting the gauge, so the Go Prom client kept the last set value in memory forever. Classifying asset_not_found as not_found and calling DeleteLabelValues clears all gauge series (allInBps, spread, takerFee, funding, tiers) so Lighter/BTC etc. drops off the rankings instead of carrying stale top-ranked values indefinitely.
Collaborator
Author
|
Superseded by #1621 + will cherry-pick to main after that merges |
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.
Cherry-pick of #1619 → main.
Lighter removed BTC/ETH/SOL from their perp markets. The harness returned
asset_not_foundon every tick but never cleared the gauge, so the Go Prom client kept the last known value in memory as a ghost metric. Lighter was showing as #1 for BTC all-in cost indefinitely.Fix: classify
asset_not_foundasnot_foundand callDeleteLabelValueson all gauge series (allInBps, spread, takerFee, funding, and all tier gauges) when that error type fires.After merging, rebuild the
perp-feesDocker image on the VPS to deploy the fix.