Interface MetricRegistrationObserver

All Known Implementing Classes:
GrpcMetricRegistrationObserver

public interface MetricRegistrationObserver
Observer of the registration of metrics due to metric annotations applied to executables--constructors and methods.

Implementations make themselves known via the Java service loader mechanism.

Once registered, the observer is notified each time a metric required by a metric annotation is registered.

  • Method Summary

    Modifier and Type
    Method
    Description
    void
    onRegistration(MetricAnnotationDiscovery discovery, Metadata metadata, MetricID metricId, Metric metric)
    Notifies the observer that a metric has been registered due to a metric annotation that applies to an executable.
  • Method Details

    • onRegistration

      void onRegistration(MetricAnnotationDiscovery discovery, Metadata metadata, MetricID metricId, Metric metric)
      Notifies the observer that a metric has been registered due to a metric annotation that applies to an executable.
      Parameters:
      discovery - the MetricAnnotationDiscovery triggering this metric registration
      metadata - the metrics Metadata for the indicated metric
      metricId - the MetricID for the indicated metric
      metric - the metric associated with the discovery index