Class MetricsApplicationListener
java.lang.Object
org.apache.dubbo.metrics.listener.AbstractMetricsListener<TimeCounterEvent>
org.apache.dubbo.metrics.listener.AbstractMetricsKeyListener
org.apache.dubbo.metrics.listener.MetricsApplicationListener
- All Implemented Interfaces:
MetricsLifeListener<TimeCounterEvent>,MetricsListener<TimeCounterEvent>
App-level listener type, in most cases, can use the static method
to produce an anonymous listener for general monitoring
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic AbstractMetricsKeyListeneronErrorEventBuild(MetricsKey metricsKey, MetricsPlaceValue placeType, CombMetricsCollector<?> collector) Similar to onFinishEventBuildstatic AbstractMetricsKeyListeneronFinishEventBuild(MetricsKey metricsKey, MetricsPlaceValue placeType, CombMetricsCollector<?> collector) To end the monitoring normally, in addition to increasing the number of corresponding indicators, use the introspection method to calculate the relevant rt indicatorsstatic AbstractMetricsKeyListeneronPostEventBuild(MetricsKey metricsKey, CombMetricsCollector<?> collector) Perform auto-increment on the monitored key, Can use a custom listener instead of this generic operationMethods inherited from class org.apache.dubbo.metrics.listener.AbstractMetricsKeyListener
isSupport, onError, onEvent, onEvent, onFinishMethods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.apache.dubbo.metrics.listener.MetricsLifeListener
onEventError, onEventFinish
-
Constructor Details
-
MetricsApplicationListener
-
-
Method Details
-
onPostEventBuild
public static AbstractMetricsKeyListener onPostEventBuild(MetricsKey metricsKey, CombMetricsCollector<?> collector) Perform auto-increment on the monitored key, Can use a custom listener instead of this generic operation- Parameters:
metricsKey- Monitor keycollector- Corresponding collector
-
onFinishEventBuild
public static AbstractMetricsKeyListener onFinishEventBuild(MetricsKey metricsKey, MetricsPlaceValue placeType, CombMetricsCollector<?> collector) To end the monitoring normally, in addition to increasing the number of corresponding indicators, use the introspection method to calculate the relevant rt indicators- Parameters:
metricsKey- Monitor keycollector- Corresponding collector
-
onErrorEventBuild
public static AbstractMetricsKeyListener onErrorEventBuild(MetricsKey metricsKey, MetricsPlaceValue placeType, CombMetricsCollector<?> collector) Similar to onFinishEventBuild
-