-
Notifications
You must be signed in to change notification settings - Fork 68
Add GetExecutionStats endpoint to count executions from the last 7 days with status breakdowns #229
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
…ys with status breakdowns Co-Authored-By: Chris Li <chris.li.2046@gmail.com>
🤖 Devin AI EngineerI'll be helping with this pull request! Here's what you should know: ✅ I will automatically:
Note: I can only respond to comments from users who have write access to this repository. ⚙️ Control Options:
|
Co-Authored-By: Chris Li <chris.li.2046@gmail.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR integrates a new GetExecutionStats endpoint into the Aggregator service to provide execution statistics (total, succeeded, failed counts, and average execution time) from the last 7 days. It includes updates in the protobuf definitions and generated files, the Engine implementation, and the RPC server routing for the new endpoint.
Reviewed Changes
Copilot reviewed 8 out of 8 changed files in this pull request and generated 1 comment.
Show a summary per file
File | Description |
---|---|
protobuf/node_grpc.pb.go | Updated the reference to use wrappers instead of wrapperspb for the Ack method. |
protobuf/node.proto | Modified the source and import paths within the proto file. |
protobuf/node.pb.go | Updated timestamp and wrapper types as per the updated proto definitions. |
protobuf/avs_grpc.pb.go | Updated wrapper references and introduced the new GetExecutionStats RPC method. |
protobuf/avs.proto | Added definitions for GetExecutionStatsReq and GetExecutionStatsResp messages and method. |
core/taskengine/engine.go | Added GetExecutionStats method to calculate execution stats from recent executions. |
aggregator/rpc_server.go | Added the GetExecutionStats endpoint handler with authentication and logging support. |
Co-Authored-By: Chris Li <chris.li.2046@gmail.com>
…ys with status breakdowns (#229) * Add GetExecutionStats endpoint to count executions from the last 7 days with status breakdowns Co-Authored-By: Chris Li <chris.li.2046@gmail.com> * Add average execution time to GetExecutionStats endpoint Co-Authored-By: Chris Li <chris.li.2046@gmail.com> * style: Automated gofmt Formatted Go code using gofmt. * chore: Regenerate protobuf code for GetExecutionStats endpoint Co-Authored-By: Chris Li <chris.li.2046@gmail.com> * fix: Update node.proto import path and regenerate protobuf code Co-Authored-By: Chris Li <chris.li.2046@gmail.com> * refactor: Replace magic number with TaskIDLength constant Co-Authored-By: Chris Li <chris.li.2046@gmail.com> --------- Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> Co-authored-by: Chris Li <chris.li.2046@gmail.com> Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
…ys with status breakdowns (#229) * Add GetExecutionStats endpoint to count executions from the last 7 days with status breakdowns Co-Authored-By: Chris Li <chris.li.2046@gmail.com> * Add average execution time to GetExecutionStats endpoint Co-Authored-By: Chris Li <chris.li.2046@gmail.com> * style: Automated gofmt Formatted Go code using gofmt. * chore: Regenerate protobuf code for GetExecutionStats endpoint Co-Authored-By: Chris Li <chris.li.2046@gmail.com> * fix: Update node.proto import path and regenerate protobuf code Co-Authored-By: Chris Li <chris.li.2046@gmail.com> * refactor: Replace magic number with TaskIDLength constant Co-Authored-By: Chris Li <chris.li.2046@gmail.com> --------- Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> Co-authored-by: Chris Li <chris.li.2046@gmail.com> Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Add GetExecutionStats Endpoint
This PR adds a new endpoint to count executions from the last 7 days with status breakdowns and average execution time.
Changes
GetExecutionStats
RPC method to the Aggregator serviceHow to Call the Endpoint
First, create an API key with admin role:
Then use the API key in your client code:
Testing
The implementation follows the existing patterns in the codebase and should pass all linting checks.
Link to Devin run: https://app.devin.ai/sessions/a73bc9315323484b8daf567302a18099
Requested by: Chris Li (chris@avaprotocol.org)