Support relabel path of ehttp client to solve the high cardinality issue #322
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.
HTTP 客户端的请求的 path 里如果有参数会在指标系统里产生高基数问题
一般场景下,通过在 url 里加上参数占位符,并设置 path 参数可以解决这一问题,如:
这样拦截器里获取的 url path 会是
/id{foo}
但有些场景,如:使用 ehttp 客户端转发请求时,我们并不方便使用上述方式一个一个指定请求 url,这时候可能需要支持配置 path 的重写规则,匹配带参数 path 重命名为统一的 path
注意使用该配置会带来一定的性能开销