Skip to content
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

Fix metric-blocklist for datacenter_info, service_info, and last_successful_response #162

Merged
merged 6 commits into from
Apr 18, 2024

Conversation

leklund
Copy link
Member

@leklund leklund commented Apr 17, 2024

Fixes #155

To ensure that this change is does not break existing implementations, it only supports adding these "meta" metrics to the blocklist. Otherwise any users with an existing allowlist would no longer see those metrics.

Usage example:

fastly-exporter -metric-allowlist='fastly_rt_requests_total' -metric-blocklist='fastly_rt_datacenter_info' -metric-blocklist='fastly_rt_service_info' -metric-blocklist='fastly_rt_last_successful_response' 

Only checking the blocklist won't chagne existing behavior with
allowlists
The datacentercache is only used for building the
`fastly_rt_datacenter_info` so if that mertic is in the blocklist we can
safely disable the cache and the gatherer
* New TokenRecorder with Gatherer and Set methods
* New gauge metric: fastly_rt_token_expiration

also: go mod tidy
@leklund leklund added the enhancement New feature or request label Apr 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

-metric-blocklist doesn't work with fastly_rt_datacenter_info
2 participants