Sentinel Could metric exclude resources those are not in rules?

5m1hhzi4  于 2021-11-29  发布在  Java
关注(0)|答案(4)|浏览(320)

Issue Description

Type: feature request

Describe what happened (or what feature you want)

We are using sentinel, while we collected the metric, we found that all request will be recorded in the**metric.log. In our scenes, we hope the resource those are not in our rules may not be recorded, in case to reduce metrics.
我们公司当前正在使用sentinel,我们发现在收集metric的时候,所有的请求都会被统计在 metric.log中,不论资源是否是限流或者熔断或者是未配置的资源。
我们希望有配置能够让非配置的资源不进入metric统计,来实现减少metric的目标。当前统计所有接口的话metric实在太多了。
我们当前使用的版本是1.8.0,查看了release note,没有发现满足上述需求的内容。

Describe what you expected to happen

The resource those are not in our rules may not be recorded, in case to reduce metrics.
我们希望有配置能够让非配置的资源不进入metric统计,来实现减少metric的目标。

How to reproduce it (as minimally and precisely as possible)

  1. start the app with sentinel
  2. visit a resource that not in rules
  3. the visit records will be in metric.log
  4. 启动接入sentinel的应用
  5. 访问一个未配置任何限流或者降级规则的资源(接口)
  6. 该资源的访问被记录在metric.log中

Tell us your environment

sdk version 1.8.0

Anything else we need to know?

No

btxsgosb

btxsgosb1#

Hi, it's not supported yet to filter out resources when writing metric logs. Discussions and contributions are welcomed!

cu6pst1q

cu6pst1q2#

是指没有配置规则的资源吗?如果不进入metric统计的话,在控制台实时监控里就看不到流量监控数据了,有时可能需要根据监控来配置规则。

通过配置来过滤资源不进入metric统计,这个想法挺好的,根据实际需求来配置。
怎么配置对于使用上方便,通过配置文件、启动参数或者在控制台界面配置,看看哪一种更好呢? @furaul@sczyh30

x8goxv8g

x8goxv8g3#

I think config file or JVM argument is better, because the dashboard is not necessary for everyone.

dluptydi

dluptydi4#

Agree.
I think config file or JVM argument is more flexible.
I would like to implement this feature in the sdk used in my company, and contribute it to the community.
@cdfive@sczyh30

相关问题