public interface MetricExtension
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.
| Modifier and Type | Method and Description |
|---|---|
void |
addBlock(String resource,
int n,
String origin,
BlockException blockException,
Object... args)
Add current block count of the resource name.
|
void |
addException(String resource,
int n,
Throwable throwable)
Add current exception count of the resource name.
|
void |
addPass(String resource,
int n,
Object... args)
Add current pass count of the resource name.
|
void |
addRt(String resource,
long rt,
Object... args)
Add response time of the resource name.
|
void |
addSuccess(String resource,
int n,
Object... args)
Add current completed count of the resource name.
|
void |
decreaseThreadNum(String resource,
Object... args)
Decrease current thread count of the resource name.
|
void |
increaseThreadNum(String resource,
Object... args)
Increase current thread count of the resource name.
|
void addPass(String resource, int n, Object... args)
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.void addBlock(String resource, int n, String origin, BlockException blockException, Object... args)
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.void addSuccess(String resource, int n, Object... args)
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.void addException(String resource, int n, Throwable throwable)
n - count to addresource - resource namethrowable - exception related.void addRt(String resource, long rt, Object... args)
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.void increaseThreadNum(String resource, Object... args)
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.Copyright © 2019 Alibaba Group. All rights reserved.