Package io.helidon.microprofile.metrics
Class MetricsCdiExtension
- java.lang.Object
-
- io.helidon.servicecommon.restcdi.HelidonRestCdiExtension<MetricsSupport>
-
- io.helidon.microprofile.metrics.MetricsCdiExtension
-
- All Implemented Interfaces:
Extension
public class MetricsCdiExtension extends HelidonRestCdiExtension<MetricsSupport>
MetricsCdiExtension class.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class io.helidon.servicecommon.restcdi.HelidonRestCdiExtension
HelidonRestCdiExtension.WorkItemsManager<W>
-
-
Constructor Summary
Constructors Constructor Description MetricsCdiExtension()
Creates a new extension instance.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description protected void
clearAnnotationInfo(AfterDeploymentValidation adv)
Cleans up any data structures created during annotation processing but which are not needed once the CDI container has started.protected void
processManagedBean(ProcessManagedBean<?> pmb)
Deals with a managed bean that survived vetoing, provided by concrete extension implementations.protected void
recordProducerFields(ProcessProducerField<? extends Metric,?> ppf)
Records metric producer fields defined by the application.protected void
recordProducerMethods(ProcessProducerMethod<? extends Metric,?> ppm)
Records metric producer methods defined by the application.static <E extends Member & AnnotatedElement>
voidregisterMetric(E element, Class<?> clazz, MetricUtil.LookupResult<? extends Annotation> lookupResult)
Deprecated.This method is made public to migrate from metrics1 to metrics2 for gRPC, this should be refactoredprotected static void
registerMetricsForAnnotatedSitesFromGrpcTest()
Deprecated.protected Routing.Builder
registerService(Object adv, BeanManager bm, ServerCdiExtension server)
Registers the service-related endpoint, after security and as CDI initializes the app scope, returning the default routing for optional use by the caller.-
Methods inherited from class io.helidon.servicecommon.restcdi.HelidonRestCdiExtension
isConcreteNonInterceptor, isOwnProducerOrNonDefaultQualified, observeManagedBeans, producers, recordAnnotatedType, recordProducerField, recordProducerMethod, serviceSupport
-
-
-
-
Method Detail
-
registerMetric
@Deprecated public static <E extends Member & AnnotatedElement> void registerMetric(E element, Class<?> clazz, MetricUtil.LookupResult<? extends Annotation> lookupResult)
Deprecated.This method is made public to migrate from metrics1 to metrics2 for gRPC, this should be refactoredDO NOT USE THIS METHOD please.- Type Parameters:
E
- type of element- Parameters:
element
- elementclazz
- classlookupResult
- lookup result
-
registerMetricsForAnnotatedSitesFromGrpcTest
@Deprecated protected static void registerMetricsForAnnotatedSitesFromGrpcTest()
Deprecated.For test use only. This method is used from gRPC integration tests and should not be used elsewhere.
-
processManagedBean
protected void processManagedBean(ProcessManagedBean<?> pmb)
Description copied from class:HelidonRestCdiExtension
Deals with a managed bean that survived vetoing, provided by concrete extension implementations.The meaning of "process" varies among the concrete implementations. At this point, this base implementation has managed the annotation processing in a general way (e.g., only non-vetoed beans survive) and now delegates to the concrete implementations to actually respond appropriately to the bean and whichever of its members are annotated.
- Specified by:
processManagedBean
in classHelidonRestCdiExtension<MetricsSupport>
- Parameters:
pmb
- the managed bean, with at least one annotation of interest to the extension
-
clearAnnotationInfo
protected void clearAnnotationInfo(@Observes AfterDeploymentValidation adv)
Description copied from class:HelidonRestCdiExtension
Cleans up any data structures created during annotation processing but which are not needed once the CDI container has started.- Overrides:
clearAnnotationInfo
in classHelidonRestCdiExtension<MetricsSupport>
- Parameters:
adv
- theAfterDeploymentValidation
event
-
recordProducerFields
protected void recordProducerFields(@Observes ProcessProducerField<? extends Metric,?> ppf)
Records metric producer fields defined by the application. Ignores producers with non-default qualifiers and library producers.- Parameters:
ppf
- Producer field.
-
recordProducerMethods
protected void recordProducerMethods(@Observes ProcessProducerMethod<? extends Metric,?> ppm)
Records metric producer methods defined by the application. Ignores producers with non-default qualifiers and library producers.- Parameters:
ppm
- Producer method.
-
registerService
protected Routing.Builder registerService(@Observes @Priority(1010) @Initialized(javax.enterprise.context.ApplicationScoped.class) Object adv, BeanManager bm, ServerCdiExtension server)
Description copied from class:HelidonRestCdiExtension
Registers the service-related endpoint, after security and as CDI initializes the app scope, returning the default routing for optional use by the caller.- Overrides:
registerService
in classHelidonRestCdiExtension<MetricsSupport>
- Parameters:
adv
- app-scoped initialization eventbm
- BeanManagerserver
- the ServerCdiExtension- Returns:
- default routing
-
-