Skip to content

Fix metrics filter with colon : in query value #428

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

dn0
Copy link

@dn0 dn0 commented Apr 15, 2025

Example of a metric filter affected by this:

cloudsql.googleapis.com/database:resource.labels.database_id=project-id:database-name

Example of a metric filter affected by this:
```
cloudsql.googleapis.com/database:resource.labels.database_id=project-id:database-name
```

Signed-off-by: Daniel Kontsek <[email protected]>
@dn0 dn0 changed the title Fix metrics filter with : in query value Fix metrics filter with colon : in query value Apr 15, 2025
@dn0
Copy link
Author

dn0 commented Apr 15, 2025

@SuperQ @kgeckhart Feel free to close this one in favor of anything that will fix this :)

The problem is visible in debug logs

level=INFO source=stackdriver_exporter.go:366 msg="Starting stackdriver_exporter" version="(version=0.18.0, branch=HEAD, revision=3b1a6e9ebb85a176b8ab48639f8e0a2a4a2f7bcf)" build_context="...." metric_prefixes="[... cloudsql.googleapis.com/database/disk/bytes_used cloudsql.googleapis.com/database/disk/quota cloudsql.googleapis.com/database/up]" extra_filters="cloudsql.googleapis.com/database:resource.labels.database_id=my-project-id:my-database" projectIDs=[my-project-id] projectsFilter=""

level=DEBUG source=monitoring_collector.go:285 msg="retrieving Google Stackdriver Monitoring metrics for descriptor" project_id=my-project-id descriptor=cloudsql.googleapis.com/database/disk/bytes_used

level=DEBUG source=monitoring_collector.go:315 msg="retrieving Google Stackdriver Monitoring metrics with filter" project_id=my-project-id filter="metric.type=\"cloudsql.googleapis.com/database/disk/bytes_used\" AND (resource.labels.database_id=my-project-idmy-database)"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant