-
Notifications
You must be signed in to change notification settings - Fork 11.8k
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
Alerting: Show annotations markers in TimeSeries panel when using Loki as … #72084
Alerting: Show annotations markers in TimeSeries panel when using Loki as … #72084
Conversation
ab6350b
to
f5ca316
Compare
public/app/features/alerting/unified/components/rules/state-history/useRuleHistoryRecords.tsx
Outdated
Show resolved
Hide resolved
8784041
to
edfa992
Compare
edfa992
to
b0d5626
Compare
b0d5626
to
e34fb29
Compare
ea59ab4
to
814935a
Compare
|
/deploy-to-hg |
|
…ion-markers-loki-history
/deploy-to-hg |
|
|
/deploy-to-hg |
|
|
…i as … (#72084) * WIP: Show annotations markers in TimeSeries panel when using Loki as alert state history * WIP changes * Fix converting log records to data frame for panel * Move fetching alert state history with Loki to the PannelQueryRunner to keep the panel flow * use dasboardUID and panelUID for requesting Loki ash * fix wrong prettier change * Only request loki ash when having alertstate * Use panelID as param in history query * Refactor: move getRuleHistoryRecordsForPanel and remove filtering code as is not used * Adress PR review comments * Add try catch for ash request * Add tests for updatePanelDataWithASHFromLoki method * Address PR review suggestions * review suggestion * Add test for logRecordsToDataFrameForPanel method * pr Review nit suggestion * Dont show toast messages from Loki request
@soniaAguilarPeiron this could have needed a design doc and review from dashboard squad, adding a query like this directly to PanelQueryRunner feels a bit hacky., and a loki store for annotations should go through the normal annotations API endpoint, so it can be used to store user created annotations events these annotations now sidestep Grafana's annotation system and cannot be disabled |
After an internal conversation in slack, we are going to rethink how this new alert state history with Loki is implemented so we can get it directly from the current annotation system in Grafana. |
…i as … (grafana#72084) * WIP: Show annotations markers in TimeSeries panel when using Loki as alert state history * WIP changes * Fix converting log records to data frame for panel * Move fetching alert state history with Loki to the PannelQueryRunner to keep the panel flow * use dasboardUID and panelUID for requesting Loki ash * fix wrong prettier change * Only request loki ash when having alertstate * Use panelID as param in history query * Refactor: move getRuleHistoryRecordsForPanel and remove filtering code as is not used * Adress PR review comments * Add try catch for ash request * Add tests for updatePanelDataWithASHFromLoki method * Address PR review suggestions * review suggestion * Add test for logRecordsToDataFrameForPanel method * pr Review nit suggestion * Dont show toast messages from Loki request
…nel when u… (grafana#74576) Revert "Alerting: Show annotations markers in TimeSeries panel when using Loki as … (grafana#72084)" This reverts commit de6ef53.
What is this feature?
This PR renders Annotations markers for alerts in the TimeSeries panel, when using Loki for the alert state history.
So far, the TimeSeries panel still queries the old alert state history.
For this reason, these markers don't appear when using Loki as ASH, as it still only queries the
/annotations endpoint
directly.Why do we need this feature?
TimeSeries panel should query the ASH endpoint and show the makers, even when in Loki alert state history mode.
Who is this feature for?
All users.
Special notes for your reviewer:
ash-final.mp4
Please check that: