feat: support more specific prefixes in ?collect parameter #387
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This changes the
?collect
parameter filter to allow more specific prefixes than those setup in the metrics-prefixes.Example use cases:
redis.googleapis.com/stats/memory/usage_ratio
prefix set in the?collect
config of dozens of projects.Now, I'd like to enable the
redis.googleapis.com/stats/memory/usage
metric in the stackdriver_exporter metric prefixes, but since it conflicts with the more-specificredis.googleapis.com/stats/memory/usage_ratio
metric name, the exporter will stop accepting the?collect
param I've set in other configurations.redis.googleapis.com
metrics, but only collect 1 or 2 metrics with?collect
. Currently, the prefixes have to be exact matches so this is not possible without the proposed change.To test:
Other question: is there a technical reason that would prevent from having a flag disabling prefix filtering in
?collect
?