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

Support fetching metrics from remote Prometheus server #433

Merged
merged 7 commits into from
Nov 26, 2024

Conversation

Jeffwan
Copy link
Collaborator

@Jeffwan Jeffwan commented Nov 25, 2024

Pull Request Description

  1. Support fetching metrics from remote Prometheus server
  • support basic auth
  • adopt prometheus/client_golang to do the query
  1. Build a metrics dictionary
  2. Mocked app updates
  • provide monotone increasing metrics from mocked app
  • update to use prometheus metrics

Related Issues

Resolves:
#432 #423

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.

1. Update histogram to make metric generation monotone increasing
2. Support to scrape app metrics from prometheus
total_throughput := 2*promptThroughput.Value + generationThroughput.Value
klog.V(4).Infof("pod: %v, podIP: %v, promptThroughput: %v, generationThroughput: %v, total_throughput: %v",
pod.Name, pod.Status.PodIP, promptThroughput, generationThroughput, total_throughput)
totalThroughput := 2*promptThroughput.Value + generationThroughput.Value
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

@brosoul I forgot to push this change in last PR. this has been addressed here.

@Jeffwan Jeffwan force-pushed the jiaxin/routing-support branch from 41d5ddb to 2a7cc77 Compare November 26, 2024 01:16
@Jeffwan Jeffwan force-pushed the jiaxin/routing-support branch from c1068f8 to c7d973b Compare November 26, 2024 02:13
@Jeffwan
Copy link
Collaborator Author

Jeffwan commented Nov 26, 2024

@brosoul feel free to take a look

@Jeffwan
Copy link
Collaborator Author

Jeffwan commented Nov 26, 2024

I will skip the code review at this moment. it's ok we see issue on master branch, let's move a little bit fast and fix those issues.

@Jeffwan Jeffwan merged commit 3691295 into main Nov 26, 2024
10 checks passed
@Jeffwan Jeffwan deleted the jiaxin/routing-support branch November 26, 2024 07:02
gangmuk pushed a commit that referenced this pull request Jan 25, 2025
* Update mocked app to support prometheus

1. Update histogram to make metric generation monotone increasing
2. Support to scrape app metrics from prometheus

* Support scraping prometheus metrics

* Add different labels for same metrics

* Use a single source to track all metrics

* Update dockerfile

* Fix metric name

* fix some typos
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.

1 participant