danielhaviv opened a new pull request, #37153:
URL: https://github.com/apache/spark/pull/37153

   ### What changes were proposed in this pull request?
   Add a `# TYPE` comment for every exposed Prometheus metric
   
   ### Why are the changes needed?
   
   According to [Prometheus' exposition 
format](https://github.com/prometheus/docs/blob/main/content/docs/instrumenting/exposition_formats.md),
 a type comment is expected before every metric.
   
   The PrometheusServlet exposed the metrics with types as lables, which is not 
in accordance with the expected format.
   This causes tools such Cloudwatch agent to treat such metrics as untyped and 
discard them.
   
   ### Does this PR introduce _any_ user-facing change?
   <!--
   Note that it means *any* user-facing change including all aspects such as 
the documentation fix.
   If yes, please clarify the previous behavior and the change this PR proposes 
- provide the console output, description and/or an example to show the 
behavior difference if possible.
   If possible, please also clarify if this is a user-facing change compared to 
the released Spark versions or within the unreleased branches such as master.
   If no, write 'No'.
   -->
   
   
   ### How was this patch tested?
   Manually tested by letting CloudWatch agent scrape the Prometheus endpoint 
of a modified spark driver.
   All metrics reported with a type, which were previously discarded, have been 
added to CW:
   
   
![image](https://user-images.githubusercontent.com/11798914/178227039-716597cb-eb18-47bc-9da1-d894f830362d.png)
   
   
   
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to