Skip to content
This repository was archived by the owner on Dec 23, 2023. It is now read-only.

Commit 817f27b

Browse files
Bogdan Drutusongy23
authored andcommitted
Update Stackdriver Trace exporter to use V2 API. (#808)
* Update Stackdriver Trace exporter to use V2 API. * Add a span with explicit probability sampling
1 parent 977a795 commit 817f27b

File tree

5 files changed

+299
-279
lines changed

5 files changed

+299
-279
lines changed

build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ subprojects {
111111
grpcVersion = '1.7.0'
112112
guavaVersion = '19.0'
113113
googleAuthVersion = '0.8.0'
114-
googleCloudVersion = '0.26.0-alpha'
114+
googleCloudVersion = '0.30.0-beta'
115115
zipkinReporterVersion = '2.0.0'
116116

117117
libraries = [

exporters/trace/stackdriver/src/main/java/io/opencensus/exporter/trace/stackdriver/StackdriverExporter.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ public static void createAndRegisterWithCredentialsAndProjectId(
6161
Credentials credentials, String projectId) throws IOException {
6262
synchronized (monitor) {
6363
checkState(handler == null, "Stackdriver exporter is already registered.");
64-
handler = StackdriverV1ExporterHandler.createWithCredentials(credentials, projectId);
64+
handler = StackdriverV2ExporterHandler.createWithCredentials(credentials, projectId);
6565
register(Tracing.getExportComponent().getSpanExporter(), handler);
6666
}
6767
}
@@ -86,7 +86,7 @@ public static void createAndRegisterWithCredentialsAndProjectId(
8686
public static void createAndRegisterWithProjectId(String projectId) throws IOException {
8787
synchronized (monitor) {
8888
checkState(handler == null, "Stackdriver exporter is already registered.");
89-
handler = StackdriverV1ExporterHandler.create(projectId);
89+
handler = StackdriverV2ExporterHandler.create(projectId);
9090
register(Tracing.getExportComponent().getSpanExporter(), handler);
9191
}
9292
}
@@ -111,7 +111,7 @@ public static void createAndRegisterWithProjectId(String projectId) throws IOExc
111111
public static void createAndRegister() throws IOException {
112112
synchronized (monitor) {
113113
checkState(handler == null, "Stackdriver exporter is already registered.");
114-
handler = StackdriverV1ExporterHandler.create(ServiceOptions.getDefaultProjectId());
114+
handler = StackdriverV2ExporterHandler.create(ServiceOptions.getDefaultProjectId());
115115
register(Tracing.getExportComponent().getSpanExporter(), handler);
116116
}
117117
}

exporters/trace/stackdriver/src/main/java/io/opencensus/exporter/trace/stackdriver/StackdriverV1ExporterHandler.java

Lines changed: 0 additions & 267 deletions
This file was deleted.

0 commit comments

Comments
 (0)