Add queryOptions.Inreval that may be used by interval/range vars#1957
Merged
Add queryOptions.Inreval that may be used by interval/range vars#1957
Conversation
✅ API Diff Results -
|
Atrax1
previously approved these changes
Apr 2, 2026
jmank88
previously approved these changes
Apr 2, 2026
f0f501b to
876eeb2
Compare
Contributor
There was a problem hiding this comment.
Pull request overview
This PR extends the Grafana dashboard/panel builder library to better control query interval behavior (to support $__interval-driven PromQL) and adds a small row-building enhancement, while also updating the Grafana Foundation SDK dependency.
Changes:
- Add per-query
Intervalsupport for Prometheus targets (viaQuery.Interval→DataqueryBuilder.Interval). - Add
FieldMinMaxtoPanelOptionsand wire it into multiple panel constructors. - Enhance
Builder.AddRowto optionally create collapsed rows; update SDK version pin ingo.mod/go.sum.
Reviewed changes
Copilot reviewed 4 out of 5 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| observability-lib/grafana/panels.go | Adds query-level interval support, duration validation helper, and propagates FieldMinMax into panel builders. |
| observability-lib/grafana/builder.go | Extends AddRow with optional collapsed behavior. |
| observability-lib/grafana/builder_test.go | Adds a test ensuring collapsed rows are set correctly. |
| observability-lib/go.mod | Updates Grafana Foundation SDK dependency to v0.0.12. |
| observability-lib/go.sum | Updates checksums for the new Grafana Foundation SDK version. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
jmank88
approved these changes
Apr 2, 2026
Atrax1
approved these changes
Apr 2, 2026
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.
Added an ability to override/set default interval for panels, which may be used by $__range/interval variables. Earlier, some panels that used those failed due to a default min interval of 15s, which was too short for those vars to provide data, compared to hardcoded time windows [3m up to 15m].
