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

feat: cpu memory metrics #2332

Merged
merged 22 commits into from
Feb 4, 2025
Merged

Conversation

adarsh0728
Copy link
Contributor

@adarsh0728 adarsh0728 commented Jan 15, 2025

  • Adds Memory and CPU pattern in metrics config at pod level
  • Adds Memory and CPU pattern in metrics config at container level [filter values added for container dropdown for a particular pod]
Screenshot 2025-01-20 at 2 35 37 PM Screenshot 2025-01-20 at 2 35 46 PM Screenshot 2025-01-20 at 2 36 05 PM

Copy link

codecov bot commented Jan 15, 2025

Codecov Report

Attention: Patch coverage is 36.36364% with 7 lines in your changes missing coverage. Please review.

Project coverage is 69.78%. Comparing base (208527d) to head (6aa7ba6).
Report is 2 commits behind head on main.

Files with missing lines Patch % Lines
server/apis/v1/handler.go 33.33% 2 Missing and 2 partials ⚠️
server/apis/v1/promql_service.go 40.00% 1 Missing and 2 partials ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2332      +/-   ##
==========================================
- Coverage   69.85%   69.78%   -0.07%     
==========================================
  Files         361      361              
  Lines       50040    50049       +9     
==========================================
- Hits        34953    34925      -28     
- Misses      14013    14041      +28     
- Partials     1074     1083       +9     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@adarsh0728 adarsh0728 requested a review from veds-g January 20, 2025 09:07
@adarsh0728 adarsh0728 requested a review from veds-g January 25, 2025 12:38
@adarsh0728 adarsh0728 marked this pull request as ready for review January 31, 2025 02:42
@adarsh0728 adarsh0728 requested a review from whynowy February 3, 2025 08:56
@@ -83,7 +85,8 @@ data:
required: false

- name: mono_vertex_histogram
object: mono-vertex
objects:
- mono-vertex
Copy link
Member

Choose a reason for hiding this comment

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

Make sure to handle the configuration change together with the release internally.

@@ -1326,6 +1327,14 @@ func (h *handler) DiscoverMetrics(c *gin.Context) {
// Computing dimension data for each metric
var dimensionData []Dimensions
for _, dimension := range metric.Dimensions {
// Check if the object is "mono-vertex", skip the "vertex"(pipeline) dimension
if object == "mono-vertex" && dimension.Name == "vertex" {
Copy link
Member

Choose a reason for hiding this comment

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

Why is there some logic like this?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I introduced Objects field which can be a list now instead of Object, because there was too much duplicity of patterns in config(handling pipeline and monoVertex separately).

Now, when, frontend wants to know the metrics for monoVertex, we don't want to send the ones with dimension vertex(pipeline). Hence the check

Copy link
Member

@whynowy whynowy left a comment

Choose a reason for hiding this comment

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

Discussed offline, need to rethink and refactor the approach of doing configuration as well as the frontend implementation. Approving this PR for now to unblock.

@adarsh0728 adarsh0728 merged commit 12c2720 into numaproj:main Feb 4, 2025
25 checks passed
veds-g added a commit that referenced this pull request Feb 19, 2025
Signed-off-by: adarsh0728 <[email protected]>
Co-authored-by: Vedant Gupta <[email protected]>
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.

3 participants