perp-fees: delete gauges on asset_not_found (Lighter ghost metrics) - #1621
Merged
Conversation
This was referenced Jul 28, 2026
Flotapponnier
added a commit
that referenced
this pull request
Jul 28, 2026
* perp-fees: delete gauges on asset_not_found (Lighter ghost metrics) (#1621) * perp-fees: delete gauges on asset_not_found to prevent ghost metrics * add mayan/squid/socket/across to provider registry and logo manifest * perp-fees: fix GMX subsquid schema + edgeX depth level (#1622) GMX: Subsquid removed positionFeeFactor field; query was 400ing on every tick. Remove the dropped field and its Go fallback. edgeX: depth endpoint only accepts level=15 or 200, not 100. The invalid level returned empty_orderbook on every tick.
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.
Problem
Lighter removed BTC, ETH, and SOL from their perp markets. Their live
/orderBookDetailsAPI returns 89 markets, none of which are BTC/ETH/SOL. The harness returnsasset_not_foundon every 5-minute tick butrecordSample()returned early without clearing the gauge — so the Go Prom client kept the last.Set()value in memory as a ghost metric. Lighter showed as #1 all-in cost indefinitely.Fix
not_founderror class toclassifyErr()(matchesasset_not_foundandunsupported_venue)not_found, delete all gauge series before returning:allInBps,spread,takerFee,funding,fetchLatency,lastRefresh, and all four tier gaugesDeploy after merge
Rebuild
perp-feeson VPS so the fix takes effect on the next tick.