[BUGFIX] Statchart: request instant queries for stat panels#738
Merged
jgbernalp merged 1 commit intoJul 21, 2026
Merged
Conversation
tgitelman
force-pushed
the
fix/statchart-instant-query-mode
branch
from
July 19, 2026 21:09
b65548d to
0db1cdd
Compare
Gladorme
approved these changes
Jul 20, 2026
Gladorme
left a comment
Member
There was a problem hiding this comment.
Make sense to me to be instant query. Thanks!
You will need to sign commit to pass DCO :)
StatChart never sets queryOptions.mode, so the query plugin defaults to
range queries (query_range). Stat panels display a single aggregate
value (last, sum, avg, etc.) and have no use for time-series data
points — they should request instant queries instead.
This is consistent with TimeSeriesTable and HistogramChart which already
set queryOptions: { mode: 'instant' }.
Ref: perses/perses#4270
Signed-off-by: Tal Gitelman <tgitelma@redhat.com>
tgitelman
force-pushed
the
fix/statchart-instant-query-mode
branch
from
July 21, 2026 09:19
0db1cdd to
f2f7c06
Compare
jgbernalp
enabled auto-merge
July 21, 2026 09:41
Member
|
I forgot the sparkline behavior, without range data, it will break. Stat chart need to support both instant and range. We will need to revert the PR |
Nexucis
added a commit
that referenced
this pull request
Jul 21, 2026
This reverts commit 3e3b7ae. Signed-off-by: Augustin Husson <augustin.husson@amadeus.com>
7 tasks
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.
Summary
Ref: perses/perses#4270
StatChart never sets
queryOptions.mode, so the query plugin defaultsto range queries (
query_range). Stat panels display a single aggregatevalue (last, sum, avg, etc.) and have no use for time-series data points
— they should request instant queries instead.
This is consistent with
TimeSeriesTableandHistogramChartwhichalready set
queryOptions: { mode: 'instant' }.Changes
statchart/src/StatChart.ts:queryOptions: { mode: 'instant' }to the StatChart panel plugin definitionReproduction
count_over_time(... [$__range]))query_range— datasource returns multiple data points, only one is usedquery(instant) — datasource returns a single correct valueTest plan
query_type=instant)TimeSeriesTableandHistogramChartbehavior