prometheus-community / prometheus-community/stackdriver_exporter
Backends by state metric causes 500 error on exposition
Open
Nobody has claimed this yet.
- Dominant language
- Go
- Stars
- 295
- Forks
- 117
- Avg merge
- 9d 14h
- Merged PRs (30d)
- 7
Description
The stackdriver_cloudsql_database_cloudsql_googleapis_com_database_postgresql_num_backends_by_state metric appears to have some collection issue when I enabled it. The exposition returns a 500 error.
An error has occurred while serving metrics:\n\n43 error(s) occurred:\n* [from Gatherer #2] collected metric \"stackdriver_cloudsql_database_cloudsql_googleapis_com_database_postgresql_num_backends_by_state\" { label:{name:\"database\" value:\"cloudsqladmin\"} label:{name:\"database_id\" value:\"my-project:mydb\"} label:{name:\"project_id\" value:\"my-project..p_ms:1724089680000} was collected before with the same name and label values\n* [from Gatherer #2] collected metric \"stackdriver_cloudsql_database_cloudsql_googleapis_com_database_uptime\" { label:{name:\"database_id\" value:\"myproject:myotherdb\"} label:{name:\"project_id\" value:\"myproject\"} label:{name:\"region\" value:\"us-central\"} label:{name:\"unit\" value:\"s\"} gauge:{value:60} timestamp_ms:1724089680000} was collected before with the same name and label values\n
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the 500 response with the Cloud SQL backends-by-state metric enabled, then trace how the exporter gathers and exposes the reported duplicate metric samples. Done means the metrics endpoint serves successfully and the affected metrics are not collected more than once with identical names and labels.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- gcp, go, prometheus
- Domain
- cloud, observability
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100