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

upgrade opentelemetry and zipkin-reporter version #14338

Merged
merged 2 commits into from
Jun 19, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions dubbo-dependencies-bom/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -122,8 +122,8 @@
<commons_lang3_version>3.14.0</commons_lang3_version>
<envoy_api_version>0.1.35</envoy_api_version>
<micrometer.version>1.13.0</micrometer.version>
<opentelemetry.version>1.26.0</opentelemetry.version>
<zipkin-reporter.version>2.16.4</zipkin-reporter.version>
<opentelemetry.version>1.39.0</opentelemetry.version>
<zipkin-reporter.version>3.4.0</zipkin-reporter.version>
<micrometer-tracing.version>1.3.0</micrometer-tracing.version>
<t_digest.version>3.3</t_digest.version>
<prometheus_client.version>0.16.0</prometheus_client.version>
Expand Down
5 changes: 5 additions & 0 deletions dubbo-metrics/dubbo-tracing/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -115,5 +115,10 @@
<artifactId>log4j-slf4j-impl</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>io.zipkin.reporter2</groupId>
<artifactId>zipkin-reporter</artifactId>
<optional>true</optional>
</dependency>
</dependencies>
</project>
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@
import org.apache.dubbo.rpc.model.ApplicationModel;

import zipkin2.Span;
import zipkin2.codec.BytesEncoder;
import zipkin2.codec.SpanBytesEncoder;
import zipkin2.reporter.BytesEncoder;
import zipkin2.reporter.SpanBytesEncoder;

/**
* Zipkin span exporter for OTel.
Expand All @@ -30,8 +30,9 @@ public class ZipkinSpanExporter {

public static io.opentelemetry.sdk.trace.export.SpanExporter getSpanExporter(
ApplicationModel applicationModel, ExporterConfig.ZipkinConfig zipkinConfig) {
BytesEncoder<Span> spanBytesEncoder = getSpanBytesEncoder(applicationModel);
return io.opentelemetry.exporter.zipkin.ZipkinSpanExporter.builder()
.setEncoder(getSpanBytesEncoder(applicationModel))
.setEncoder(spanBytesEncoder)
.setEndpoint(zipkinConfig.getEndpoint())
.setReadTimeout(zipkinConfig.getReadTimeout())
.build();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,9 @@

import brave.handler.SpanHandler;
import zipkin2.Span;
import zipkin2.codec.BytesEncoder;
import zipkin2.codec.SpanBytesEncoder;
import zipkin2.reporter.AsyncReporter;
import zipkin2.reporter.BytesEncoder;
import zipkin2.reporter.SpanBytesEncoder;
import zipkin2.reporter.urlconnection.URLConnectionSender;

/**
Expand All @@ -43,7 +43,8 @@ public static SpanHandler getSpanHandler(
sender = builder.build();
}

AsyncReporter<Span> spanReporter = AsyncReporter.builder(sender).build(getSpanBytesEncoder(applicationModel));
BytesEncoder<Span> spanBytesEncoder = getSpanBytesEncoder(applicationModel);
AsyncReporter<Span> spanReporter = AsyncReporter.builder(sender).build(spanBytesEncoder);
return zipkin2.reporter.brave.ZipkinSpanHandler.newBuilder(spanReporter).build();
}

Expand Down
Loading