接口 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
  • 方法详细资料

    • addPass

      void addPass(String resource, int n, Object... args)
      Add current pass count of the resource name.
      参数:
      n - count to add
      resource - resource name
      args - additional arguments of the resource, eg. if the resource is a method name, the args will be the parameters of the method.
    • addBlock

      void addBlock(String resource, int n, String origin, BlockException blockException, Object... args)
      Add current block count of the resource name.
      参数:
      n - count to add
      resource - resource name
      origin - 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

      void addSuccess(String resource, int n, Object... args)
      Add current completed count of the resource name.
      参数:
      n - count to add
      resource - resource name
      args - additional arguments of the resource, eg. if the resource is a method name, the args will be the parameters of the method.
    • addException

      void addException(String resource, int n, Throwable throwable)
      Add current exception count of the resource name.
      参数:
      n - count to add
      resource - resource name
      throwable - exception related.
    • addRt

      void addRt(String resource, long rt, Object... args)
      Add response time of the resource name.
      参数:
      rt - response time in millisecond
      resource - resource name
      args - additional arguments of the resource, eg. if the resource is a method name, the args will be the parameters of the method.
    • increaseThreadNum

      void increaseThreadNum(String resource, Object... args)
      Increase current thread count of the resource name.
      参数:
      resource - resource name
      args - additional arguments of the resource, eg. if the resource is a method name, the args will be the parameters of the method.
    • decreaseThreadNum

      void decreaseThreadNum(String resource, Object... args)
      Decrease current thread count of the resource name.
      参数:
      resource - resource name
      args - additional arguments of the resource, eg. if the resource is a method name, the args will be the parameters of the method.