Skip to content

Add per-operation 404 counters - #3299

Merged
beijxu merged 1 commit into
linkedin:masterfrom
nicolaslopezbravo:nbravo/per-operation-404-metrics
Sep 10, 2026
Merged

beijxu merged 1 commit into
linkedin:masterfrom
nicolaslopezbravo:nbravo/per-operation-404-metrics

Conversation

@nicolaslopezbravo

Copy link
Copy Markdown
Contributor

Summary

Add per-operation NotFoundCount counters so object-GET, HEAD, and LIST 404 rates can be monitored independently. Count each request once using its recorded response status; preserve existing counters.

Durability: storage operations, response handling, and persisted formats remain unchanged. Copilot assisted implementation and test coverage.

Testing Done

  • Local code review completed.
  • 49 targeted cases passed: request metrics/tracker (9), Netty response channel (38), and frontend routing/variant isolation (2).
JAVA_HOME=$(/usr/libexec/java_home -v 17) ./gradlew --no-daemon --max-workers=2 -PdisableShipkit \
  :ambry-api:jar :ambry-api:test \
  --tests com.github.ambry.rest.RestRequestMetricsTest \
  --tests com.github.ambry.rest.RestRequestMetricsTrackerTest \
  :ambry-rest:test --tests com.github.ambry.rest.NettyResponseChannelTest \
  :ambry-frontend:test \
  --tests com.github.ambry.frontend.FrontendRestRequestServiceTest.testNotFoundMetricsFollowS3Routing \
  --tests com.github.ambry.frontend.FrontendRestRequestServiceTest.testNotFoundMetricsIsolateTransportAndEncryptionVariants

Add per-operation NotFoundCount using existing request completion accounting.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
@codecov-commenter

codecov-commenter commented Sep 9, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 50.72%. Comparing base (52ba813) to head (fbddb36).
⚠️ Report is 420 commits behind head on master.

Additional details and impacted files
@@              Coverage Diff              @@
##             master    #3299       +/-   ##
=============================================
- Coverage     64.24%   50.72%   -13.53%     
+ Complexity    10398     8714     -1684     
=============================================
  Files           840      939       +99     
  Lines         71755    80794     +9039     
  Branches       8611     9749     +1138     
=============================================
- Hits          46099    40980     -5119     
- Misses        23004    36417    +13413     
- Partials       2652     3397      +745     

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

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@nicolaslopezbravo
nicolaslopezbravo marked this pull request as ready for review September 9, 2026 16:57
@beijxu
beijxu merged commit 92d5e15 into linkedin:master Sep 10, 2026
11 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.

3 participants