[Prometheus]: Mark ALERTS synthetic metric as a gauge (#99328)

Mark ALERTS synthetic metric as a gauge

It's not a counter. It can go down in value, but counters cannot
pull/99366/head
Sam Jewell 6 months ago committed by GitHub
parent 4b8e6b3401
commit 97db8b19c7
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
  1. 2
      packages/grafana-prometheus/src/language_utils.test.ts
  2. 2
      packages/grafana-prometheus/src/language_utils.ts

@ -91,7 +91,7 @@ describe('parseSelector()', () => {
describe('fixSummariesMetadata', () => {
const synthetics = {
ALERTS: {
type: 'counter',
type: 'gauge',
help: 'Time series showing pending and firing alerts. The sample value is set to 1 as long as the alert is in the indicated active (pending or firing) state.',
},
};

@ -323,7 +323,7 @@ export function fixSummariesMetadata(metadata: { [metric: string]: PromMetricsMe
// Synthetic series
const syntheticMetadata: PromMetricsMetadata = {};
syntheticMetadata['ALERTS'] = {
type: 'counter',
type: 'gauge',
help: 'Time series showing pending and firing alerts. The sample value is set to 1 as long as the alert is in the indicated active (pending or firing) state.',
};

Loading…
Cancel
Save