diff --git a/sdk-tests/pom.xml b/sdk-tests/pom.xml
index 609d6d5d8..0567b615a 100644
--- a/sdk-tests/pom.xml
+++ b/sdk-tests/pom.xml
@@ -20,7 +20,7 @@
${project.basedir}/proto
1.59.0
3.17.3
- 0.14.0
+ 1.39.0
3.0.13
@@ -103,7 +103,12 @@
io.opentelemetry
opentelemetry-sdk-metrics
- ${opentelemetry.version}-alpha
+ ${opentelemetry.version}
+
+
+ io.opentelemetry
+ opentelemetry-exporter-common
+ ${opentelemetry.version}
io.opentelemetry
@@ -115,6 +120,17 @@
opentelemetry-exporter-zipkin
${opentelemetry.version}
+
+
+ io.zipkin.reporter2
+ zipkin-reporter
+ 3.4.0
+
+
+ io.zipkin.reporter2
+ zipkin-sender-okhttp3
+ 3.4.0
+
io.dapr
dapr-sdk
diff --git a/sdk-tests/src/test/java/io/dapr/it/tracing/OpenTelemetry.java b/sdk-tests/src/test/java/io/dapr/it/tracing/OpenTelemetry.java
index bae97e7a6..08a6ea88f 100644
--- a/sdk-tests/src/test/java/io/dapr/it/tracing/OpenTelemetry.java
+++ b/sdk-tests/src/test/java/io/dapr/it/tracing/OpenTelemetry.java
@@ -14,11 +14,10 @@
package io.dapr.it.tracing;
import io.dapr.utils.NetworkUtils;
-import io.opentelemetry.api.GlobalOpenTelemetry;
import io.opentelemetry.api.trace.propagation.W3CTraceContextPropagator;
import io.opentelemetry.context.Context;
import io.opentelemetry.context.propagation.ContextPropagators;
-import io.opentelemetry.context.propagation.TextMapPropagator;
+import io.opentelemetry.context.propagation.TextMapSetter;
import io.opentelemetry.exporter.zipkin.ZipkinSpanExporter;
import io.opentelemetry.sdk.OpenTelemetrySdk;
import io.opentelemetry.sdk.trace.SdkTracerProvider;
@@ -41,11 +40,7 @@ public class OpenTelemetry {
public static io.opentelemetry.api.OpenTelemetry createOpenTelemetry(String serviceName) throws InterruptedException {
waitForZipkin();
String httpUrl = String.format("http://localhost:%d", ZIPKIN_PORT);
- ZipkinSpanExporter zipkinExporter =
- ZipkinSpanExporter.builder()
- .setEndpoint(httpUrl + ENDPOINT_V2_SPANS)
- .setServiceName(serviceName)
- .build();
+ ZipkinSpanExporter zipkinExporter = ZipkinSpanExporter.builder().setEndpoint(httpUrl + ENDPOINT_V2_SPANS).build();
SdkTracerProvider sdkTracerProvider = SdkTracerProvider.builder()
.addSpanProcessor(SimpleSpanProcessor.create(zipkinExporter))
@@ -54,15 +49,15 @@ public static io.opentelemetry.api.OpenTelemetry createOpenTelemetry(String serv
return OpenTelemetrySdk.builder()
.setTracerProvider(sdkTracerProvider)
.setPropagators(ContextPropagators.create(W3CTraceContextPropagator.getInstance()))
- .buildAndRegisterGlobal();
+ .build();
}
/**
* Converts current OpenTelemetry's context into Reactor's context.
* @return Reactor's context.
*/
- public static reactor.util.context.Context getReactorContext() {
- return getReactorContext(Context.current());
+ public static reactor.util.context.Context getReactorContext(io.opentelemetry.api.OpenTelemetry openTelemetry) {
+ return getReactorContext(openTelemetry, Context.current());
}
/**
@@ -70,12 +65,12 @@ public static reactor.util.context.Context getReactorContext() {
* @param context OpenTelemetry's context.
* @return Reactor's context.
*/
- public static reactor.util.context.Context getReactorContext(Context context) {
+ public static reactor.util.context.Context getReactorContext(io.opentelemetry.api.OpenTelemetry openTelemetry,
+ Context context) {
Map map = new HashMap<>();
- TextMapPropagator.Setter