Class PrometheusMetricsGenerator

java.lang.Object
org.apache.pulsar.broker.stats.prometheus.PrometheusMetricsGenerator

public class PrometheusMetricsGenerator extends 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
  • Constructor Details

    • PrometheusMetricsGenerator

      public PrometheusMetricsGenerator()
  • Method Details

    • generate

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

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

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