Class Filter


  • public class Filter
    extends java.lang.Object
    Filter implements the common functionality provided by the two MetricsFilter implementations:
    • javax version: io.prometheus.client.filter.MetricsFilter provided by simpleclient_servlet
    • jakarta version: io.prometheus.client.servlet.jakarta.filter.MetricsFilter provided by simpleclient_servlet_jakarta
    • Field Detail

      • PATH_COMPONENT_PARAM

        static final java.lang.String PATH_COMPONENT_PARAM
        See Also:
        Constant Field Values
      • STRIP_CONTEXT_PATH_PARAM

        static final java.lang.String STRIP_CONTEXT_PATH_PARAM
        See Also:
        Constant Field Values
      • statusCounter

        private Counter statusCounter
      • pathComponents

        int pathComponents
      • metricName

        private java.lang.String metricName
      • stripContextPath

        boolean stripContextPath
      • help

        private java.lang.String help
      • buckets

        private double[] buckets
    • Constructor Detail

      • Filter

        public Filter()
      • Filter

        public Filter​(java.lang.String metricName,
                      java.lang.String help,
                      java.lang.Integer pathComponents,
                      double[] buckets,
                      boolean stripContextPath)
        If you want to configure the filter programmatically instead of via web.xml, you can pass all configuration parameters to this constructor.