ambry icon indicating copy to clipboard operation
ambry copied to clipboard

Add account level metrics for container metrics

Open justinlin-linkedin opened this issue 1 year ago • 1 comments

Summary

Add account level metric to aggregate its containers' metrics.

Details

Some accounts have lots of containers and it's very hard those those accounts to aggregate all the metrics for 40x, 50x and latency etc. This PR adds an AccountMetrics class and have its ContainerMetrics to record metrics for AccountMetrics.

This PR also adds a configuration to only enable some accounts to have this AccountMetrics as most accounts have very small set of containers that they just don't need extra metrics.

Test

Unit test

justinlin-linkedin avatar Oct 21 '24 21:10 justinlin-linkedin

Codecov Report

Attention: Patch coverage is 70.17544% with 17 lines in your changes missing coverage. Please review.

Project coverage is 70.26%. Comparing base (52ba813) to head (a6fb9fc). Report is 128 commits behind head on master.

Files with missing lines Patch % Lines
.../github/ambry/frontend/EntityOperationMetrics.java 69.23% 9 Missing and 3 partials :warning:
...java/com/github/ambry/frontend/AccountMetrics.java 0.00% 2 Missing :warning:
...va/com/github/ambry/frontend/ContainerMetrics.java 60.00% 1 Missing and 1 partial :warning:
...github/ambry/frontend/RestRequestMetricsGroup.java 83.33% 0 Missing and 1 partial :warning:
Additional details and impacted files
@@             Coverage Diff              @@
##             master    #2926      +/-   ##
============================================
+ Coverage     64.24%   70.26%   +6.01%     
- Complexity    10398    11982    +1584     
============================================
  Files           840      866      +26     
  Lines         71755    73711    +1956     
  Branches       8611     8870     +259     
============================================
+ Hits          46099    51793    +5694     
+ Misses        23004    19212    -3792     
- Partials       2652     2706      +54     

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

codecov-commenter avatar Oct 21 '24 21:10 codecov-commenter