fix(insights): add live price feeds count to the end of kpi metrics #2434
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.
Summary
Include the live count of price feeds as a final data point after the kpi history metrics in the insights hub Overview tab metric cards.
Rationale
Previously, we only displayed the historical values for the number of price feeds. However, since we're adding price feeds fairly fast, this means there's an obvious discrepancy between the last data point for the number of feeds which shows up in the metric card in the Overview page and the much higher number of feeds that you see on the price feeds page.
This PR solves the problem by including a data point for today's value along with the KPI metrics.
TBH it's a bit janky because this means the amount of time between the last two data points much less than between any other two points -- all other points will have a month between them but the last point could come as little as a few days after the prior point. However, the Overview page is a bit of a stopgap which we don't expect to live long so it should be OK to hold us over for now.
How has this been tested?