Skip to content

Commit

Permalink
increase sampling rate and add zerodep for docker-java
Browse files Browse the repository at this point in the history
  • Loading branch information
hiteshkhatri97 committed Oct 24, 2023
1 parent ae03794 commit 1fcae10
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 5 deletions.
4 changes: 2 additions & 2 deletions integration-tests/opentelemetry-jaeger-remote/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -79,8 +79,8 @@
</exclusions>
</dependency>
<dependency>
<groupId>jakarta.ws.rs</groupId>
<artifactId>jakarta.ws.rs-api</artifactId>
<groupId>com.github.docker-java</groupId>
<artifactId>docker-java-transport-zerodep</artifactId>
<scope>test</scope>
</dependency>
<!-- Minimal test dependencies to *-deployment artifacts for consistent build order -->
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@ quarkus.application.name=opentelemetry-integration-test-jeager-remote
quarkus.application.version=999-SNAPSHOT

quarkus.otel.traces.sampler=jaeger_remote
quarkus.otel.traces.sampler.arg=endpoint=http://localhost:14250,pollingInterval=5000,initialSamplingRate=0.01
quarkus.otel.traces.sampler.arg=endpoint=http://localhost:14250,pollingInterval=5000,initialSamplingRate=0.9
quarkus.otel.traces.exporter=jaeger
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,11 @@
import com.github.dockerjava.api.command.CreateContainerResponse;
import com.github.dockerjava.api.model.ExposedPort;
import com.github.dockerjava.api.model.Ports;
import com.github.dockerjava.core.DockerClientBuilder;
import com.github.dockerjava.core.DefaultDockerClientConfig;
import com.github.dockerjava.core.DockerClientConfig;
import com.github.dockerjava.core.DockerClientImpl;
import com.github.dockerjava.transport.DockerHttpClient;
import com.github.dockerjava.zerodep.ZerodepDockerHttpClient;

import io.opentelemetry.api.OpenTelemetry;
import io.opentelemetry.api.trace.Span;
Expand All @@ -41,7 +45,12 @@ public class OTelJaegerRemoteTest {
private static final DockerClient dockerClient;

static {
dockerClient = DockerClientBuilder.getInstance().build();
DockerClientConfig config = DefaultDockerClientConfig.createDefaultConfigBuilder().build();
DockerHttpClient httpClient = new ZerodepDockerHttpClient.Builder()
.dockerHost(config.getDockerHost())
.sslConfig(config.getSSLConfig())
.build();
dockerClient = DockerClientImpl.getInstance(config, httpClient);
if (dockerClient.listContainersCmd().exec().stream()
.noneMatch(container -> container.getNames()[0].equals("/jaeger"))) {
ExposedPort queryPort = ExposedPort.tcp(QUERY_PORT);
Expand Down

0 comments on commit 1fcae10

Please sign in to comment.