Uploaded image for project: 'Spark'
  1. Spark
  2. SPARK-39619

PrometheusServlet: add "TYPE" comment to exposed metrics

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Open
    • Major
    • Resolution: Unresolved
    • 3.0.0, 3.1.0, 3.2.0, 3.3.0
    • None
    • Input/Output
    • None

    Description

      The PrometheusServlet sink does not include the usual comments when exposing the metrics in the prometheus format

      e.g. `# TYPE nginx_ingress_controller_ingress_upstream_latency_seconds summary`

      which prevents some client/integrations that depend on them to assess the metric type to work properly.

      For example the AWS cloudwatch agent prometheus plugin attempts to get the metric type from the TYPE comment and considers any metric with no type as unsuported and hence drops it. 

      As a result the cloudwatch agent prometheus drops all the metrics exposed by the PrometheusServlet.

      https://github.com/aws/amazon-cloudwatch-agent/blob/1f654cf69c1269073673ba2f636738c556248a31/plugins/inputs/prometheus_scraper/metrics_type_handler.go#L190

       

      This would be solved by adding the TYPE comments to the metrics exposed by the PrometheusServlet sink.

       

      references:

      Attachments

        Activity

          People

            Unassigned Unassigned
            ebarault Eric Barault
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated: