接口 MetricExtension
- 所有已知子接口:
AdvancedMetricExtension
public interface MetricExtension
This interface provides extension to Sentinel internal statistics.
Please note that all method in this class will invoke in the same thread of biz logic. It's necessary to not do time-consuming operation in any of the interface's method, otherwise biz logic will be blocked.
- 从以下版本开始:
- 1.6.1
- 作者:
- Carpenter Lee
-
方法概要
修饰符和类型方法说明voidaddBlock(String resource, int n, String origin, BlockException blockException, Object... args) Add current block count of the resource name.voidaddException(String resource, int n, Throwable throwable) Add current exception count of the resource name.voidAdd current pass count of the resource name.voidAdd response time of the resource name.voidaddSuccess(String resource, int n, Object... args) Add current completed count of the resource name.voiddecreaseThreadNum(String resource, Object... args) Decrease current thread count of the resource name.voidincreaseThreadNum(String resource, Object... args) Increase current thread count of the resource name.
-
方法详细资料
-
addPass
Add current pass count of the resource name.- 参数:
n- count to addresource- resource nameargs- additional arguments of the resource, eg. if the resource is a method name, the args will be the parameters of the method.
-
addBlock
Add current block count of the resource name.- 参数:
n- count to addresource- resource nameorigin- the original invoker.blockException- block exception related.args- additional arguments of the resource, eg. if the resource is a method name, the args will be the parameters of the method.
-
addSuccess
Add current completed count of the resource name.- 参数:
n- count to addresource- resource nameargs- additional arguments of the resource, eg. if the resource is a method name, the args will be the parameters of the method.
-
addException
Add current exception count of the resource name.- 参数:
n- count to addresource- resource namethrowable- exception related.
-
addRt
Add response time of the resource name.- 参数:
rt- response time in millisecondresource- resource nameargs- additional arguments of the resource, eg. if the resource is a method name, the args will be the parameters of the method.
-
increaseThreadNum
Increase current thread count of the resource name.- 参数:
resource- resource nameargs- additional arguments of the resource, eg. if the resource is a method name, the args will be the parameters of the method.
-
decreaseThreadNum
Decrease current thread count of the resource name.- 参数:
resource- resource nameargs- additional arguments of the resource, eg. if the resource is a method name, the args will be the parameters of the method.
-