-
Notifications
You must be signed in to change notification settings - Fork 14
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
ServiceSelection: add support for aggregated metric #713
Conversation
…0/patterns-runtime-resource-call
…0/patterns-runtime-resource-call
…0/patterns-runtime-resource-call
…e detected_labels
This reverts commit a4fcc32.
…1/aggregated-metric
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looking good! curious what the labels
call is for now that we've gone back to the regular /volume
call using service_name=~".+"
? I'm fine leaving the resource type and logic to run a labels query (as we need it for __stream_shard__
and I'm sure for other things in the future), but I don't think we need to add the state to the ServiceSelection scene unless I'm missing something?
const aggregatedMetricsEnabled: boolean | undefined = config.featureToggles.exploreLogsAggregatedMetrics; | ||
// Don't export AGGREGATED_SERVICE_NAME, we want to rename things so the rest of the application is agnostic to how we got the services | ||
const AGGREGATED_SERVICE_NAME = '__aggregated_metric__'; | ||
const AGGREGATED_METRIC_START_DATE = dateTime('2024-08-30', 'YYYY-MM-DD'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
eventually we may want this to be configurable (ie. OSS users), but I'm totally fine with this for now
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Agreed, @svennergr is there a way we can configure this in deployment tools with an env variable or something so OSS users can set their own date?
…1/aggregated-metric
Co-authored-by: Sven Grossmann <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's go!
Fixes: #711
Provides experimental support for aggregated metrics within explore logs with the
exploreLogsAggregatedMetrics
feature flag in Grafana.Aggregated metrics trade off resolution for much more performant queries.
Using the gdev-loki docker image in this repo:
Using the Grafana dev cluster on a 5 minute query (sum of duration of top 8 queries in service selection):
For a 12hr query (sum of duration of top 2 queries in service selection, each broken up into 6 2hr chunks):
Here's it in action on a 24hr query:
https://github.com/user-attachments/assets/a3e24f6e-268a-45ea-aa91-2e805d95f0ab
Notes for reviewer: