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 metrics app registry clear-out code from metrics extension; add doc #6956

Merged
merged 2 commits into from
Jun 7, 2023

Conversation

tjquinno
Copy link
Member

@tjquinno tjquinno commented Jun 6, 2023

Resolves #4656

Prior to this PR, the metrics CDI extension cleared the application metrics registry late in the CDI life cycle. Metrics registered earlier during start-up by developer code (such as from a developer-written extension) would disappear.

The clear-out code is needed to allow the TCK tests to work correctly.

This PR does two main things:

  1. Move the clear-out code from the normal metrics extension into a TCK-only extension.
  2. Add documentation explaining that user code should not register metrics before the RuntimeStart CDI event.

Helidon will not prevent users from registering metrics prematurely. But the metrics system might not behave as configured if they do. The doc additions explain this.

…ribing correct way to deal with metrics from extensions
@tjquinno tjquinno added this to the 3.2.2 milestone Jun 6, 2023
@tjquinno tjquinno self-assigned this Jun 6, 2023
@oracle-contributor-agreement oracle-contributor-agreement bot added the OCA Verified All contributors have signed the Oracle Contributor Agreement. label Jun 6, 2023
Copy link
Contributor

@ljamen ljamen left a comment

Choose a reason for hiding this comment

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

LGTM - minor typos

docs/mp/metrics/metrics.adoc Outdated Show resolved Hide resolved
docs/mp/metrics/metrics.adoc Outdated Show resolved Hide resolved
spericas
spericas previously approved these changes Jun 7, 2023
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 4de3d46 into helidon-io:helidon-3.x Jun 7, 2023
@tjquinno tjquinno deleted the metrics-late-clear-3.x branch June 7, 2023 18:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
OCA Verified All contributors have signed the Oracle Contributor Agreement.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

MP Metrics clears app registry late in CDI start-up life cycle
3 participants