thinkharderdev opened a new pull request, #504:
URL: https://github.com/apache/arrow-ballista/pull/504

   # Which issue does this PR close?
   
   <!--
   We generally require a GitHub issue to be filed for all bug fixes and 
enhancements and this helps us generate change logs for our releases. You can 
link an issue to this PR using the GitHub syntax. For example `Closes #123` 
indicates that this PR will close issue #123.
   -->
   
   Closes #427
   
   Posting for feedback now but still need to do a couple more small things:
   [] Verify the REST API endpoint works
   [] Decide whether prometheus should be default feature or not
   
    # Rationale for this change
   <!--
    Why are you proposing this change? If this is already explained clearly in 
the issue then this section is not needed.
    Explaining clearly why changes are proposed helps reviewers understand your 
changes and offer better suggestions for fixes.  
   -->
   
   We should expose metrics from the scheduler in a standard format. This PR 
adds an initial integration with prometheus to expose some basic scheduler 
metrics
   
   # What changes are included in this PR?
   <!--
   There is no need to duplicate the description in the issue here but it is 
sometimes worth providing a summary of the individual changes in this PR.
   -->
   
   1. Add a new trait `SchedulerMetricsCollector` which is plugged into the 
core event loop to capture metrics
   2. Add some additional metadata to the job events so we can track durations 
of the different parts of the query lifecycle (queued, planning, execution) 
separately. 
   3. Add an implementation of `SchedulerMetricsCollector` for prometheus
   4. Add an API endpoint `/api/metrics` which will expose metrics. 
   5. Add some baseline metrics
   
   In addition, I did some refactoring to make the core event loop more 
testable. Currently you can't really test it rigorously at all which is not 
great since it is a rather critical piece of code. I added a new trait 
`TaskLauncher` which can control how the `TaskManager` which actually launch 
tasks and various crate-private methods to plug in a custom launcher. I don't 
imagine this will ever be something exposed through a public API but it is very 
useful for testing. 
   
   Using the `TaskLauncher` I added some additional utilities to write 
scheduler test more succinctly. 
   
   # Are there any user-facing changes?
   <!--
   If there are user-facing changes then we may require documentation to be 
updated before approving the PR.
   -->
   
   Users can plug in their own metrics collector if they want. 
   
   <!--
   If there are any breaking changes to public APIs, please add the `api 
change` label.
   -->
   
   No
   


-- 
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]

Reply via email to