Skip to content
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

[Misc ]Add runtime api metrics #251

Merged
merged 2 commits into from
Sep 27, 2024
Merged

[Misc ]Add runtime api metrics #251

merged 2 commits into from
Sep 27, 2024

Conversation

brosoul
Copy link
Collaborator

@brosoul brosoul commented Sep 27, 2024

Pull Request Description

  1. Add metrics about engine and aibrix version info
  2. Add metrics about HTTP API latency and count

The metrics result could be
image

Related Issues

Resolves: #167

Important: Before submitting, please complete the description above and review the checklist below.


Contribution Guidelines (Expand for Details)

We appreciate your contribution to aibrix! To ensure a smooth review process and maintain high code quality, please adhere to the following guidelines:

Pull Request Title Format

Your PR title should start with one of these prefixes to indicate the nature of the change:

  • [Bug]: Corrections to existing functionality
  • [CI]: Changes to build process or CI pipeline
  • [Docs]: Updates or additions to documentation
  • [API]: Modifications to aibrix's API or interface
  • [CLI]: Changes or additions to the Command Line Interface
  • [Misc]: For changes not covered above (use sparingly)

Note: For changes spanning multiple categories, use multiple prefixes in order of importance.

Submission Checklist

  • PR title includes appropriate prefix(es)
  • Changes are clearly explained in the PR description
  • New and existing tests pass successfully
  • Code adheres to project style and best practices
  • Documentation updated to reflect changes (if applicable)
  • Thorough testing completed, no regressions introduced

By submitting this PR, you confirm that you've read these guidelines and your changes align with the project's contribution standards.

@brosoul
Copy link
Collaborator Author

brosoul commented Sep 27, 2024

The metrics about download still need to add. It is not determined which type of Prometheus is more suitable for recording. (Gauge or Histogram )

I think the downloaded metrics can be implemented when accessing the download API later.

@brosoul brosoul requested a review from Jeffwan September 27, 2024 12:17
@brosoul brosoul changed the title [Misc ]Add runtime metrics [Misc ]Add runtime api metrics Sep 27, 2024
response = await call_next(request)
return response

start_time = time.perf_counter()
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

metrics part looks good to mean and this is a clean way to support metrics

@Jeffwan
Copy link
Collaborator

Jeffwan commented Sep 27, 2024

@brosoul histogram should be used for downloading time since we'd like to use the distribution etc. I agree that we can postpone the feature development whenever we are ready to switch to runtime downloading API

@Jeffwan Jeffwan merged commit 217eb6e into main Sep 27, 2024
10 checks passed
@Jeffwan Jeffwan deleted the linhui/runtime-metrics branch September 27, 2024 14:00
gangmuk pushed a commit that referenced this pull request Jan 25, 2025
* feat: add info metrics

* feat: add metrics about aibrix runtime api
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add model load/unload metric for AI Runtime
2 participants