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

Remove clear-out of registries from extension; do it in TCK-only shutdown observer; update doc #8292

Merged
merged 1 commit into from
Jan 26, 2024

Conversation

tjquinno
Copy link
Member

@tjquinno tjquinno commented Jan 24, 2024

Description

Resolves #8287

(mostly a forward-port of PR #6956. See that PR for more info)

Early in Helidon 3 the metrics CDI extension cleared out the application MetricRegistry late in its initialization. This was primarily to allow TCK tests, which start up the container repeatedly, to work. (Some of the TCK tests reuse the same metric name for different metric types; if the registry was not cleared out between TCK tests the second attempt to register the same-named metric would fail.)

Later in Helidon 3 (but after the code base for 4 had been started), we changed this so a TCK-only CDI extension did the clean-out and we removed that code from the 3.x metrics CDI extension.

This PR does basically the same thing but in the Helidon 4 codebase. The PR also adds some doc comments (copied from the 3.x PR) warning users against registering metrics from their own CDI extensions until after the metrics extension has run and initialized metrics using the correct configuration.

Documentation

PR includes doc changes.

…down observer; update doc

Signed-off-by: Tim Quinn <tim.quinn@oracle.com>
@tjquinno tjquinno requested a review from spericas January 24, 2024 22:47
@tjquinno tjquinno self-assigned this Jan 24, 2024
@oracle-contributor-agreement oracle-contributor-agreement bot added the OCA Verified All contributors have signed the Oracle Contributor Agreement. label Jan 24, 2024
@tjquinno tjquinno added the 4.x Version 4.x label Jan 24, 2024
@tjquinno tjquinno requested a review from ljnelson January 24, 2024 23:19
Copy link
Member

@spericas spericas left a comment

Choose a reason for hiding this comment

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

LGTM

@tjquinno tjquinno merged commit b02a537 into helidon-io:main Jan 26, 2024
12 checks passed
@tjquinno tjquinno deleted the 4.x-metrics-late-clear branch January 26, 2024 18:05
hrstoyanov pushed a commit to hrstoyanov/helidon that referenced this pull request Feb 23, 2024
…down observer; update doc (helidon-io#8292)

Signed-off-by: Tim Quinn <tim.quinn@oracle.com>
tvallin pushed a commit to tvallin/helidon that referenced this pull request Feb 28, 2024
…down observer; update doc (helidon-io#8292)

Signed-off-by: Tim Quinn <tim.quinn@oracle.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
4.x Version 4.x OCA Verified All contributors have signed the Oracle Contributor Agreement.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[4.x] MP Metrics clears app registry late in CDI start-up life cycle
2 participants