Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

Log based distribution metric counts each event 10 times

Aperta
#392 0 commenti 1 reazione 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 2 giorni

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
4/5
Tempo stimato
3-5 giorni
Idoneità per principianti
42/100
Tipo di issue
Bug
Chiarezza
Abbastanza chiara
Stato di attività
Ferma
Stack tecnologico
gcp, go, prometheus

Direzione di ricerca

Inizia dalla gestione delle metriche di distribuzione in stackdriver_exporter 0.16.0, in particolare dalle impostazioni aggregateDeltas e aggregateDeltasTTL mostrate nella configurazione Helm. Riproduci la discrepanza confrontando il distribution _count di Google Cloud con il valore Prometheus esportato dopo aver attivato eventi individuali. Il lavoro è completato quando ogni evento incrementa il contatore esportato di uno anziché di dieci.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

In our project we noticed a peculiar discrepancy between the distribution metric values as reported by Google Cloud itself, and as exported into Prometheus by stackdriver_exporter. Upon further investigation, we could narrow down the misbehavior to what I stated in the title: each event is seemingly counted exactly 10 times, blowing up the metric values to 10x the correct value

We triggered three events after another. In Google Cloud, the _count metric correctly jumps to 1 for each event as they come in:

image

In Prometheus, using stackdriver_exporter, the _count metric incorrectly jumps to 10 for each event as they come in:

image

Later, we also tried triggering the same request twice and indeed, the stackdriver_exporter metric value increased first to 10, then to 20:

image


We set up stackdriver_exporter via Helm, using prometheus-stackdriver-exporter 4.6.2, corresponding to stackdriver_exporter 0.16.0

Out stackdriver_exporter (Helm) configuration:

prometheus-stackdriver-exporter:
  nameOverride: 'gcloud-metrics-exporter'
  fullnameOverride: 'gcloud-metrics-exporter'
  stackdriver:
    projectId: [redacted]
    serviceAccountKey: [redacted]
    metrics:
      typePrefixes: [redacted]
      # Workaround needed for accurate histogram metrics
      # https://github.com/prometheus-community/stackdriver_exporter?tab=readme-ov-file#what-to-know-about-aggregating-delta-metrics
      aggregateDeltas: true
      aggregateDeltasTTL: '30m' # default value from https://github.com/prometheus-community/helm-charts/blob/f2aeaf773cd22ae2bffb7ec846b06eadf4169387/charts/prometheus-stackdriver-exporter/values.yaml#L88 for lack of better judgment
  serviceMonitor:
    enabled: true
    namespace: monitoring
Lingua principale
Go
Stelle
299
Fork
119
Merge medio
4g 8h
PR unite (30g)
8

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di prometheus-community/stackdriver_exporter

Tutte le issue di prometheus-community/stackdriver_exporter

Issue simili

Altre issue su Go

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.