-
Notifications
You must be signed in to change notification settings - Fork 117
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Separate explore
and metrics_view
resources
#5659
Merged
Merged
+8,322
−4,123
Conversation
This file contains 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
begelundmuller
changed the title
Separate explore and metrics_view resources
Separate Sep 10, 2024
explore
and metrics_view
resources
AdityaHegde
approved these changes
Sep 11, 2024
AdityaHegde
force-pushed
the
begelundmuller/explore-resource
branch
from
September 18, 2024 06:21
aa9b68e
to
4fe8e2e
Compare
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.
Overview
This PR introduces an
Explore
resource to represent explore dashboards. The goal of this work is a) to support multipleExplore
resources deriving from oneMetricsView
, and b) to avoid automatically creating dashboards when creating aMetricsView
.Detailed changes:
Explore
resource type containing config for explore dashboards based on an underlying metrics view.Explore
resource inherits the access and field access security rules of its parent metrics view. This means itsdimensions
andmeasures
fields will reflect the current caller's attributes.GetExplore
RPC that returns an explore resource and its underlying metrics view in a single request.'*'
andexclude:
for selecting dimensions and measures from the parent metrics view (see example).default_dimensions
,default_measures
,default_time_range
,default_comparison_mode
,default_comparison_dimension
,default_theme
,available_time_zones
.webOpenPath
option in the alert and report creation APIs for persisting the explore resource to open. This should be used in addition toweb_open_state
to identify the UI page to open.version: 1
in the YAML will automatically emit anExplore
resource with the same name as the metrics view.Frontend integration notes
After this PR, the UI should always find and use an
Explore
resource before consuming aMetricsView
resource. TheExplore
resource will contain contextual information about how to query and render metrics. When creating alerts/reports/public URLs/bookmarks/etc., the frontend should make sure it captures the relevantExplore
resource that was used so that context can be restored later. We will need to pay attention to backwards compatibility for legacy resources that do not contain this contextual info.Here's an initial outline for integrating these changes in the UI:
/org/project/-/explore/<name>
that callsGetExplore
to resolve the explore and metrics view resources to render.state.validSpec
of theExplore
andMetricsView
resources, never consume thespec
directly. This ensures that thedimensions
andmeasures
are valid and reflect the security policies./org/project/<name>
route to redirect to/org/project/-/explore/<name>
.web_open_path
to the relevantExplore
resource's name or path (up to you).web_open_path
to redirect to the correctExplore
resource. It will not be set for legacy alerts/reports – here, you can fall back to searching for anExplore
resource with the same name as the alert's/report's metrics view.state.validSpec.presets
is not empty, the first entry will contain preset defaults to render. This replaces the currentdefault_dimensions
,default_measures
,default_time_range
, etc.ResourceKind.MetricsView
and consider if an explore resource should be used instead (or as well).explore
resource names.metrics_view
toexplore
resources (breaking) #5722Syntax
Full syntax:
Example: