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

Test quarkus-cxf-rt-features-metrics #504

Closed
ppalaga opened this issue Aug 22, 2022 · 4 comments · Fixed by #932
Closed

Test quarkus-cxf-rt-features-metrics #504

ppalaga opened this issue Aug 22, 2022 · 4 comments · Fixed by #932
Assignees
Labels
Milestone

Comments

@ppalaga
Copy link
Contributor

ppalaga commented Aug 22, 2022

We should add a separate integration test for quarkus-cxf-rt-features-metrics-parent, much like we have for the other extensions.

@ppalaga ppalaga added the test label Aug 23, 2022
@ppalaga
Copy link
Contributor Author

ppalaga commented Apr 3, 2023

Anybody is using quarkus-cxf-rt-features-metrics with micrometer and could sketch how it could be tested?

@shumonsharif
Copy link
Contributor

shumonsharif commented Apr 27, 2023

While I've never used it in an actual project, I believe this should be achievable in an integration test.

  1. We'll need to use the following two dependencies
    <dependency>
      <groupId>io.quarkiverse.cxf</groupId>
      <artifactId>quarkus-cxf-rt-features-metrics</artifactId>
    </dependency>
    <dependency>
      <groupId>io.quarkus</groupId>
      <artifactId>quarkus-micrometer-registry-prometheus</artifactId>
    </dependency>
  1. Include the below in applications.properties
quarkus.cxf.client."calculator-soap".features=io.quarkiverse.cxf.metrics.QuarkusCxfMetricsFeature
quarkus.micrometer.export.json.enabled=true
quarkus.micrometer.export.json.path=metrics/json
quarkus.micrometer.export.prometheus.path=metrics/prometheus
  1. Generate some traffic for CXF client and server

  2. Verify the content at http://localhost:8080/q/metrics/json, which should contain something like below for CXF clients:

"cxf.client.requests": {
"count;exception=None;faultCode=None;method=POST;operation=Add;outcome=SUCCESS;status=200;uri=http://www.dneonline.com/calculator.asmx": 1,
"elapsedTime;exception=None;faultCode=None;method=POST;operation=Add;outcome=SUCCESS;status=200;uri=http://www.dneonline.com/calculator.asmx": 309.0
},
  1. Similarly, there will be a separate block for CXF services we expose if the feature is added.

I can take a stab at it, if you'd like, over the next few weeks.

@ppalaga
Copy link
Contributor Author

ppalaga commented Apr 27, 2023

Great, thanks a lot @shumonsharif for sharing the steps and for being ready to add a test!
I guess the assignee field of this issue is the best semaphore for avoiding conflicts. Just assign to yourself once you start working on this. And the same holds for others: if anybody would like to try before @shumonsharif has time, assign to yourself or ask for assigning to you.

@ppalaga
Copy link
Contributor Author

ppalaga commented Jun 29, 2023

Let me try this before releasing 2.2.0.

@ppalaga ppalaga self-assigned this Jun 29, 2023
ppalaga added a commit to ppalaga/quarkus-cxf that referenced this issue Jun 29, 2023
ppalaga added a commit to ppalaga/quarkus-cxf that referenced this issue Jun 29, 2023
ppalaga added a commit to ppalaga/quarkus-cxf that referenced this issue Jun 29, 2023
ppalaga added a commit to ppalaga/quarkus-cxf that referenced this issue Jun 29, 2023
@ppalaga ppalaga added this to the 2.2.0 milestone Sep 20, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants