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 TypeMethodDescriptionvoidonRegistration(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- theMetricAnnotationDiscoverytriggering this metric registrationmetadata- the metricsMetadatafor the indicated metricmetricId- theMetricIDfor the indicated metricmetric- the metric associated with the discovery index
-