Repository navigation
Conversation
Introduce a single-line format that retains metric collection hierarchy while removing repeated class and field labels from logs. Cover nested and empty collections and document the new option. Resolves aws#6840.
Dricmoy
marked this pull request as ready for review
November 24, 2026 15:44
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Motivation and Context
Closes #6840.
LoggingMetricPublishercurrently offersPLAINandPRETTY, both of which can produce verbose logs when metrics are emitted frequently. A single-line format reduces repeated labels while keeping the collection hierarchy readable.Modifications
LoggingMetricPublisher.Format.COMPACT, producing output such asMetrics published: ApiCall{RetryCount=0,ApiCallAttempt{HttpStatusCode=200}}.scripts/new-change.Testing
Validated commit
5bb7fc1b00f478173830175c2c686bb48c5a12e3on macOS arm64 with JDK 21.0.11 and Maven wrapper 3.9.5:The run used isolated
-sand-gssettings for a public Maven Central mirror.metrics-spiand its required reactor modules passed, including packaging, Javadoc, dependency analysis, and the configured API compatibility check.metrics-spitests passed, including the compact logging cases.utilsreported 939 tests with 156 skipped and no failures/errors;test-utilspassed all 50 tests.metrics-spi,annotations, andutils. The earlierannotationsfailure did not reproduce in this clean run; no code changes or command-line quality-check skips were needed.The full repository suite and AWS integration tests were not run. Hosted CI has not reported checks on this PR.
Screenshots (if appropriate)
N/A
Types of changes
Checklist
./mvnw -pl :metrics-spi -am clean installsucceedsscripts/new-changeLicense