ingest_delay=true not working for some metrics
I maintainer di solito rispondono entro 2 giorni
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 3/5
- Tempo stimato
- 1-2 giorni
- Idoneità per principianti
- 45/100
- Tipo di issue
- Bug
- Chiarezza
- Abbastanza chiara
- Stato di attività
- Ferma
- Stack tecnologico
- gcp, go, prometheus
- Ambito
- api, backend, observability
Direzione di ricerca
Inizia tracciando il percorso del Go GCP exporter che legge i metadati ingestDelay, usando stackdriver_bigquery_dataset_bigquery_googleapis_com_storage_uploaded_bytes come caso di riproduzione. Confronta il relativo timestamp esportato con quello di altre metriche ritardate quando ingest_delay=true; il lavoro è completato quando questa metrica ha un timestamp coerente senza compromettere le metriche che già funzionano.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Problem: the exporter doesn't fix metric timestamp for all delayed metrics
Expected: ingest_delay works for all GCP metrics which have ingestDelay metadata available from the GCP API
When using the [gcp/stackdriver exporter], (https://grafana.com/docs/alloy/latest/reference/components/prometheus/prometheus.exporter.gcp/) with ingest_delay=true, at least some of the publisher-delayed metrics still don't appear as expected. Setting ingest_delay=true fixes timestamps for most delayed metrics but not all.
Example affected metric: stackdriver_bigquery_dataset_bigquery_googleapis_com_storage_uploaded_bytes
This seems to be an exporter issue, because the offset time is visible when visiting exporter endpoint directly and checking timestamps. This metric alone has the old timestamp, other metrics behave as expected.
This metric has the expected notice in GCP docs: "After sampling, data is not visible for up to 21720 seconds"
I also verified that the metric has this metadata and should be respected by the exporter. Here's the metric descriptor:
# List all BigQuery metric descriptors
curl -H "Authorization: Bearer $(gcloud auth print-access-token)" \
"https://monitoring.googleapis.com/v3/projects/my-project-id/metricDescriptors?filter=metric.type%3Dstarts_with(%22bigquery.googleapis.com%22)"
{
"name": "projects/my-project/metricDescriptors/bigquery.googleapis.com/storage/uploaded_bytes",
"labels": [
{
"key": "api",
"description": "Api used to upload the data (batch import or streaming)"
},
{
"key": "table",
"description": "Table name."
}
],
"metricKind": "DELTA",
"valueType": "INT64",
"unit": "By",
"description": "Uploaded bytes.",
"displayName": "Uploaded bytes",
"type": "bigquery.googleapis.com/storage/uploaded_bytes",
"metadata": {
"launchStage": "GA",
"samplePeriod": "60s",
"ingestDelay": "21720s",
"timeSeriesResourceHierarchyLevel": [
"PROJECT"
]
},
"launchStage": "GA",
"monitoredResourceTypes": [
"bigquery_dataset"
]
},
However, despite the presence of this metadata and setting ingest_delay=true, the metric is not scraped by the collector because its timestamp is always 6 hours old in the GCP exporter.
Workaround: in the Alloy collector, scrape the exporter twice, use honor_timestamps to further control the timestamp to set it to current time for this one metric. This works for now:
prometheus.scrape "test_exporter_main" {
targets = [
{"__address__" = "localhost:8081"},
]
honor_timestamps = true
forward_to = [prometheus.relabel.filter_main.receiver]
}
prometheus.scrape "test_exporter_lagging" {
targets = [
{"__address__" = "localhost:8081"},
]
honor_timestamps = false
forward_to = [prometheus.relabel.filter_lagging.receiver]
}
prometheus.relabel "filter_main" {
rule {
source_labels = ["__name__"]
regex = "old_metric_with_past_timestamp"
action = "drop"
}
forward_to = [prometheus.remote_write.metrics_service.receiver]
}
prometheus.relabel "filter_lagging" {
rule {
source_labels = ["__name__"]
regex = "old_metric_with_past_timestamp"
action = "keep"
}
forward_to = [prometheus.remote_write.metrics_service.receiver]
}
Please let me know if I can provide more information about this issue. Thank you!
- Lingua principale
- Go
- Stelle
- 298
- Fork
- 119
- Merge medio
- 4g 8h
- PR unite (30g)
- 8
Preparare l'ambiente
- Include un Dockerfile o un file Docker Compose
- Nessun modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di prometheus-community/stackdriver_exporter
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 62/100
prometheus-community/stackdriver_exporter#563 · 3 reazioni ·
I maintainer di solito rispondono entro 2 giorni
-
Unbounded concurrent Monitoring API requests exhaust memory and OOM-kill the containerForse già presa @ntmspavan l’ha presa 83 giorni fa. Aperta
Difficoltà 4/5 3-5 giorni Idoneità per principianti 35/100
prometheus-community/stackdriver_exporter#537 · 1 commento ·
I maintainer di solito rispondono entro 2 giorni
-
Difficoltà 5/5 Più di una settimana Idoneità per principianti 35/100
prometheus-community/stackdriver_exporter#478 ·
I maintainer di solito rispondono entro 2 giorni
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 55/100
prometheus-community/stackdriver_exporter#476 ·
I maintainer di solito rispondono entro 2 giorni
-
Difficoltà 4/5 3-5 giorni Idoneità per principianti 35/100
prometheus-community/stackdriver_exporter#470 ·
I maintainer di solito rispondono entro 2 giorni
Tutte le issue di prometheus-community/stackdriver_exporter
Issue simili
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
VictoriaMetrics/operator#2772 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
Gaurav-Gosain/tuios#1316 ·
I maintainer di solito rispondono entro 1 giorno
-
area:auth documentation priority:low
Difficoltà 1/5 1-3 ore Idoneità per principianti 86/100
I maintainer di solito rispondono entro 1 giorno
-
Mend: dependency security vulnerability
Difficoltà 2/5 1-3 ore Idoneità per principianti 65/100
kube-tarian/sigrun#203 ·
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
kubernetes-csi/csi-driver-iscsi#485 ·
I maintainer di solito rispondono entro 1 giorno