Class OpenMetrics2Properties

java.lang.Object
io.prometheus.metrics.config.OpenMetrics2Properties

public class OpenMetrics2Properties extends Object
Properties starting with io.prometheus.openmetrics2. These properties are experimental and subject to change.
  • Field Details

  • Constructor Details

    • OpenMetrics2Properties

      private OpenMetrics2Properties(Boolean enabled, Boolean contentNegotiation, Boolean compositeValues, Boolean exemplarCompliance, Boolean nativeHistograms)
  • Method Details

    • getEnabled

      public boolean getEnabled()
      Enable the OpenMetrics 2.0 text format writer. When true, the OM2 writer is used instead of OM1 for OpenMetrics responses. Default is false.
    • getContentNegotiation

      public boolean getContentNegotiation()
      Gate OM2 features behind content negotiation. Default is false.
    • getCompositeValues

      public boolean getCompositeValues()
      Single-line histogram/summary with st@. Default is false.
    • getExemplarCompliance

      public boolean getExemplarCompliance()
      Mandatory timestamps, no 128-char limit for exemplars. Default is false.
    • getNativeHistograms

      public boolean getNativeHistograms()
      Exponential buckets support for native histograms. Default is false.
    • load

      Note that this will remove entries from propertySource. This is because we want to know if there are unused properties remaining after all properties have been loaded.
      Throws:
      PrometheusPropertiesException
    • builder

      public static OpenMetrics2Properties.Builder builder()