Class PrometheusMetricsGenerator


  • public class PrometheusMetricsGenerator
    extends java.lang.Object
    Generate metrics aggregated at the namespace level and optionally at a topic level and formats them out in a text format suitable to be consumed by Prometheus. Format specification can be found at Exposition Formats
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static void generate​(PulsarService pulsar, boolean includeTopicMetrics, boolean includeConsumerMetrics, boolean includeProducerMetrics, boolean splitTopicAndPartitionIndexLabel, java.io.OutputStream out)  
      static void generate​(PulsarService pulsar, boolean includeTopicMetrics, boolean includeConsumerMetrics, boolean includeProducerMetrics, boolean splitTopicAndPartitionIndexLabel, java.io.OutputStream out, java.util.List<org.apache.pulsar.broker.stats.prometheus.PrometheusRawMetricsProvider> metricsProviders)  
      static void generate​(PulsarService pulsar, boolean includeTopicMetrics, boolean includeConsumerMetrics, boolean includeProducerMetrics, java.io.OutputStream out)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • PrometheusMetricsGenerator

        public PrometheusMetricsGenerator()
    • Method Detail

      • generate

        public static void generate​(PulsarService pulsar,
                                    boolean includeTopicMetrics,
                                    boolean includeConsumerMetrics,
                                    boolean includeProducerMetrics,
                                    java.io.OutputStream out)
                             throws java.io.IOException
        Throws:
        java.io.IOException
      • generate

        public static void generate​(PulsarService pulsar,
                                    boolean includeTopicMetrics,
                                    boolean includeConsumerMetrics,
                                    boolean includeProducerMetrics,
                                    boolean splitTopicAndPartitionIndexLabel,
                                    java.io.OutputStream out)
                             throws java.io.IOException
        Throws:
        java.io.IOException
      • generate

        public static void generate​(PulsarService pulsar,
                                    boolean includeTopicMetrics,
                                    boolean includeConsumerMetrics,
                                    boolean includeProducerMetrics,
                                    boolean splitTopicAndPartitionIndexLabel,
                                    java.io.OutputStream out,
                                    java.util.List<org.apache.pulsar.broker.stats.prometheus.PrometheusRawMetricsProvider> metricsProviders)
                             throws java.io.IOException
        Throws:
        java.io.IOException