Prometheus: Limit Prometheus run query event tracking to queries in Explore (#86054)

only track run query events in explore
This commit is contained in:
Brendan O'Handley
2024-04-17 20:40:27 +02:00
committed by GitHub
parent 53d2714a18
commit 55b2a4b0c0
+4 -4
View File
@@ -10,10 +10,10 @@ export function trackQuery(
startTime: Date
): void {
const { app, targets: queries } = request;
// We do want to track panel-editor and explore
// We do not want to track queries from the dashboard or viewing a panel
// also included in the tracking is cloud-alerting, unified-alerting, and unknown
if (app === CoreApp.Dashboard || app === CoreApp.PanelViewer) {
// We only track queries run in Explore.
// We do not want to track queries from the dashboard, viewing a panel,
// cloud-alerting, unified-alerting, scenes and unknown
if (app !== CoreApp.Explore) {
return;
}