Remove trailing slashes from api_base in the prometheus metrics
Why are these changes being made?
Trailing slashes in api_base values can cause increased metric cardinality resulting in higher custom metrics cost in platform such as Datadog. This can also cause metrics not getting aggregated correctly for the same api_base.
Description by Korbit AI
What change is being made?
Remove trailing slashes from
api_base
in the prometheus metricsWhy are these changes being made?
Trailing slashes in
api_base
values can cause increased metric cardinality resulting in higher custom metrics cost in platform such as Datadog. This can also cause metrics not getting aggregated correctly for the sameapi_base
.example metrics with trailing slash:
By stripping trailing slashes, this improves metrics aggregation and reduces custom metrics cost.