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

Generalize OCI metrics support; add tests for the generalization #8419

Merged
merged 2 commits into from
Feb 27, 2024

Conversation

tjquinno
Copy link
Member

@tjquinno tjquinno commented Feb 25, 2024

Description

Resolves #8429

This PR slightly generalizes how the OCI metrics integration is set up.

Most of the work continues to be done in OciMetricsBean but this class can now be extended in two ways:

  • customize what config prefix is used to fetch OCI metrics integration settings from the root node
  • customize how the OciMetricsSupport.Builder is prepared
  • allow other work around starting the OciMetricsSupport instance

The PR includes an example customization of the bean as well as tests using the customization to make sure the customized bean (designated as a CDI @Alternate and with a more urgent @Priority than the normal bean implementation) is used.

As noted in the original bean class comments, it's essential that the observer method in the bean run after an observer method in the Helidon MP metrics extension. The PR adds a test using reflection to verify this requirement.

Documentation

No impact.

This generalization is intended for use by library authors familiar with Helidon's workings as opposed to application developers. As a result, beyond the JavaDoc in the PR there is no need to update the user documentation.

Signed-off-by: Tim Quinn <tim.quinn@oracle.com>
@oracle-contributor-agreement oracle-contributor-agreement bot added the OCA Verified All contributors have signed the Oracle Contributor Agreement. label Feb 25, 2024
@tjquinno tjquinno self-assigned this Feb 25, 2024
Copy link
Member

@klustria klustria left a comment

Choose a reason for hiding this comment

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

After going through with Tim, the changes LGTM

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
2 participants