envoyproxy / ratelimit

Go/gRPC service designed to enable generic rate limit scenarios from different types of applications.
Apache License 2.0
2.3k stars 451 forks source link

fix(prometheus_sink): log errors and fallback to default metric mapper #727

Closed harpunius closed 1 week ago

harpunius commented 1 month ago

I recently migrated from statsd-exporter to the prometheus sink, and couldn't make the mapping work, until I found that the path didn't match up. This error is not logged currently, which is the main motivation for this PR.

I then thought that it would be nicer to fallback to the default mapper instead of having no mapping at all. Happy to rollback the default handling and simply add the error logs instead.

TestPrometheusSinkMetricMapperDefaultHandling is simply a test that would fail without these changes.

github-actions[bot] commented 2 weeks ago

This pull request has been automatically marked as stale because it has not had activity in the last 30 days. It will be closed in 7 days if no further activity occurs. Please feel free to give a status update now, ping for review, or re-open when it's ready. Thank you for your contributions!

github-actions[bot] commented 1 week ago

This pull request has been automatically closed because it has not had activity in the last 37 days. Please feel free to give a status update now, ping for review, or re-open when it's ready. Thank you for your contributions!