Skip to content

Commit

Permalink
Fix Fault Tolerance multiple metrics provider test
Browse files Browse the repository at this point in the history
Split OTel relatedconfiguration APIs to OpenTelemetryServerCOnfiguration
  • Loading branch information
fabiobrz committed Dec 6, 2024
1 parent 622d336 commit 1c12a81
Show file tree
Hide file tree
Showing 6 changed files with 254 additions and 208 deletions.
1 change: 1 addition & 0 deletions microprofile-fault-tolerance/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -146,6 +146,7 @@
<layers>
<layer>cloud-server</layer>
<layer>microprofile-fault-tolerance</layer>
<layer>micrometer</layer>
</layers>
</configuration>
</execution>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
import org.jboss.eap.qe.microprofile.common.setuptasks.MicroProfileFaultToleranceServerConfiguration;
import org.jboss.eap.qe.microprofile.common.setuptasks.MicroProfileTelemetryServerConfiguration;
import org.jboss.eap.qe.microprofile.common.setuptasks.MicrometerServerConfiguration;
import org.jboss.eap.qe.microprofile.common.setuptasks.OpenTelemetryServerConfiguration;
import org.jboss.eap.qe.microprofile.fault.tolerance.deployments.v10.HelloService;
import org.jboss.eap.qe.microprofile.tooling.server.configuration.creaper.ManagementClientProvider;
import org.jboss.eap.qe.microprofile.tooling.server.configuration.deployment.ConfigurationUtil;
Expand Down Expand Up @@ -142,8 +143,8 @@ public void testFaultToleranceMetricsAreTracedWithSameDeployments(
otelCollector.start();
try {
// Enable MP Telemetry based metrics, which rely on OpenTelemetry subsystem
MicroProfileTelemetryServerConfiguration.enableOpenTelemetry();
MicroProfileTelemetryServerConfiguration
OpenTelemetryServerConfiguration.enableOpenTelemetry();
OpenTelemetryServerConfiguration
.addOpenTelemetryCollectorConfiguration(otelCollector.getOtlpGrpcEndpoint());
MicroProfileTelemetryServerConfiguration.enableMicroProfileTelemetry();
try {
Expand Down Expand Up @@ -213,7 +214,7 @@ public void testFaultToleranceMetricsAreTracedWithSameDeployments(
} finally {
// disable MP Telemetry based metrics
MicroProfileTelemetryServerConfiguration.disableMicroProfileTelemetry();
MicroProfileTelemetryServerConfiguration.disableOpenTelemetry();
OpenTelemetryServerConfiguration.disableOpenTelemetry();
}
} finally {
// stop the OTel collector container
Expand Down
Loading

0 comments on commit 1c12a81

Please sign in to comment.