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

Add additional queue metrics #919

Merged
merged 5 commits into from
Nov 22, 2024
Merged

Conversation

dmanc
Copy link
Contributor

@dmanc dmanc commented Nov 20, 2024

Why are these changes needed?

image

Added max queue capacity so we can do computations to get utilization (useful if we want to scale using percentage of the request pool). Also adds overall request pool utilization for convenience.

This PR also adds GRPC metrics similar to #891

Checks

  • I've made sure the tests are passing. Note that there might be a few flaky tests, in that case, please comment that they are not relevant.
  • I've checked the new test coverage and the coverage percentage didn't drop.
  • Testing Strategy
    • Unit tests
    • Integration tests
    • This PR is not tested :(

@dmanc dmanc requested a review from jianoaix November 20, 2024 19:18
@@ -71,6 +73,20 @@ func NewMetrics(httpPort string, logger logging.Logger) *Metrics {
},
[]string{"size_bucket"},
),
QueueCapacity: promauto.With(reg).NewGauge(
Copy link
Contributor

Choose a reason for hiding this comment

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

This is configured, so doesn't look it should be exported via metric again.

Utilization is a division of queue size (already exported) by capacity.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It's convenient for visualizing the capacity on grafana dashboard. If we change the capacity it should also change on the dashboard.

@dmanc dmanc merged commit a6e08a0 into Layr-Labs:master Nov 22, 2024
6 checks passed
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.

2 participants