Class DbCounter

  • All Implemented Interfaces:
    DbInterceptor

    public final class DbCounter
    extends Object
    Counter metric for Helidon DB. This class implements the DbInterceptor and can be configured either through a DbClient.Builder or through configuration.
    • Method Detail

      • create

        public static DbCounter create()
        Create a new counter using default configuration.

        By default the name format is db.counter.statement-name, where statement-name is provided at runtime.

        Returns:
        a new counter
      • builder

        public static DbCounter.Builder builder()
        Create a new fluent API builder to create a new counter metric.
        Returns:
        a new builder instance
      • executeMetric

        protected void executeMetric​(org.eclipse.microprofile.metrics.Counter metric,
                                     CompletionStage<Void> aFuture)
      • metricType

        protected org.eclipse.microprofile.metrics.MetricType metricType()
      • metric

        protected org.eclipse.microprofile.metrics.Counter metric​(org.eclipse.microprofile.metrics.MetricRegistry registry,
                                                                  org.eclipse.microprofile.metrics.Metadata meta)
      • defaultNamePrefix

        protected String defaultNamePrefix()
      • measureErrors

        protected boolean measureErrors()
      • measureSuccess

        protected boolean measureSuccess()