Repository navigation
fix(metrics): clarify empty application metrics warning - #2758
Open
hidingmyname wants to merge 1 commit into
Open
hidingmyname wants to merge 1 commit into
hidingmyname wants to merge 1 commit into
Conversation
The cold-start metric is published through a separate logger, so the empty check only describes application metrics. Clarify the warning without changing publication or raise-on-empty behavior, document the distinction, and preserve the empty/cold-start exception invariants through the public Metrics interface.
2 of 4 tasks
|
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.



Summary
Clarify that the empty-metrics warning refers to application metrics, not the separately published
ColdStartmetric.Changes
raiseOnEmptyMetricsexception type/message unchanged.ColdStartdoes not satisfyraiseOnEmptyMetrics.Issue number: Fixes #2731
Verification
mvn -B -pl powertools-metrics -am clean testmvn -B -pl powertools-metrics -am clean verify -Pbuild-with-spotbugsmvn -B clean verify -Pbuild-with-spotbugsColdStart: 1.0EMF plus misleading warning; after: the same EMF plus the application-metrics clarificationThe executable also checks an entirely empty flush (warn, no EMF), application metrics (EMF, no warning), and
raiseOnEmptyMetricsafter cold-start publication (unchanged exception and message). Each case runs in a fresh JVM. The exact warning is verified through actual stdout/stderr rather than a new wording-only unit test.No build or dependency files changed. No AWS deployment, cloud end-to-end, GraalVM native-image, or full MkDocs site verification was performed.
Contribution context
Issue #2731 is open and untriaged. I checked open and recently closed PRs and found no duplicate implementation. This submission does not imply prior maintainer acceptance.
AI disclosure
Implemented and submitted by the omp AI coding assistant in the omp harness on behalf of @hidingmyname, at their request. The current CONTRIBUTING.md, pull request template, build workflow, and repository guidance were consulted.
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.
Disclaimer: We value your time and bandwidth. As such, any pull requests created on non-triaged issues might not be successful.