Class MetricsCdiExtension

    • Constructor Detail

      • MetricsCdiExtension

        public MetricsCdiExtension()
        Creates a new extension instance.
    • 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 refactored
        DO NOT USE THIS METHOD please.
        Type Parameters:
        E - type of element
        Parameters:
        element - element
        clazz - class
        lookupResult - 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 class HelidonRestCdiExtension<MetricsSupport>
        Parameters:
        pmb - the managed bean, with at least one annotation of interest to the extension
      • 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.