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

Configure the MetricsFeature through application.properties #1108

Closed
manubell opened this issue Nov 15, 2023 · 2 comments · Fixed by #1161
Closed

Configure the MetricsFeature through application.properties #1108

manubell opened this issue Nov 15, 2023 · 2 comments · Fixed by #1161
Milestone

Comments

@manubell
Copy link

Currently to enable metrics for quarkus-cxf it is required to use the specific feature module quarkus-cxf-rt-features-metrics and configure reference a framework class for each client or endpoint that wants to enable it.

quarkus.cxf.client.MYCLIENT.features=io.quarkiverse.cxf.metrics.QuarkusCxfMetricsFeature

Other libraries (Hibernate, Log, Scheduler, GraphQL, etc...) typically have a boolean parameter like
quarkus.EXTENSION.metrics.enabled

Would be great to have a similar parameter for quarkus-cxf. This would reduce repetitive boilerplate in the application.properties and make it very straightforward to add. Similar treatment to what was done for logging recently in #1102

Could be global as quarkus.cxf.metrics.enabled
Or separated for client and endpoint quarkus.cxf.client.metrics.enabled and quarkus.cxf.endpoint.metrics.enabled if needed.

@ppalaga ppalaga changed the title Global metrics parameter Enable the MetricsFeature through application.properties Dec 28, 2023
@ppalaga ppalaga changed the title Enable the MetricsFeature through application.properties Configure the MetricsFeature through application.properties Dec 28, 2023
@ppalaga
Copy link
Contributor

ppalaga commented Dec 28, 2023

The change is underway in #1161
The MetricsFeature is created internally and enabled by default for all clients and service endpoints, as long as the quarkus-cxf-rt-features-metrics extension is in class path. It can be disabled globally via quarkus.cxf.metrics.enabled-for and per client via quarkus.cxf.client."clients".metrics.enabled or per service endpoint via quarkus.cxf.endpoint."endpoints".metrics. I did it similarly for the new OpenTelemetry extension. Would this fulfill your needs @manubell?

@manubell
Copy link
Author

Sounds great. Thanks for the change!

@ppalaga ppalaga added this to the 2.7.0 milestone Dec 29, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants