Skip to content

Commit

Permalink
Add otel bom to pom
Browse files Browse the repository at this point in the history
  • Loading branch information
cindy-peng committed Jun 3, 2024
1 parent e035733 commit 4270847
Show file tree
Hide file tree
Showing 3 changed files with 73 additions and 35 deletions.
22 changes: 22 additions & 0 deletions google-cloud-logging/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -157,6 +157,28 @@
<artifactId>opentelemetry-sdk-trace</artifactId>
<scope>test</scope>
</dependency>
<!-- <dependency>-->
<!-- <groupId>io.opentelemetry</groupId>-->
<!-- <artifactId>opentelemetry-sdk-metrics</artifactId>-->
<!-- <scope>test</scope>-->
<!-- </dependency>-->
<!-- END OpenTelemetry -->
<!-- OpenTelemetry -->
<dependency>
<groupId>io.opentelemetry</groupId>
<artifactId>opentelemetry-semconv</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>io.opentelemetry</groupId>
<artifactId>opentelemetry-sdk-common</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.google.cloud.opentelemetry</groupId>
<artifactId>exporter-trace</artifactId>
<scope>test</scope>
</dependency>
<!-- END OpenTelemetry -->
<!-- Need testing utility classes for generated gRPC clients tests -->
<dependency>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@ public void testParsingOpenTelemetryContext() {
OpenTelemetrySdk.builder()
.setTracerProvider(
SdkTracerProvider.builder().addSpanProcessor(inMemorySpanProcessor).build())
.build();
.buildAndRegisterGlobal();

Tracer tracer = openTelemetrySdk.getTracer("ContextTest");
Span otelSpan = tracer.spanBuilder("Example Span Attributes").startSpan();
Expand Down
84 changes: 50 additions & 34 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -54,22 +54,28 @@
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
<github.global.server>github</github.global.server>
<site.installationModule>google-cloud-logging-parent</site.installationModule>
<opentelemetry.version>1.37.0</opentelemetry.version>
</properties>

<!-- OpenTelemetry -->
<dependencyManagement>
<dependencies>
<dependency>
<groupId>io.opentelemetry</groupId>
<artifactId>opentelemetry-api</artifactId>
<version>${opentelemetry.version}</version>
</dependency>
<dependency>
<groupId>io.opentelemetry</groupId>
<artifactId>opentelemetry-context</artifactId>
<version>${opentelemetry.version}</version>
<artifactId>opentelemetry-bom</artifactId>
<version>1.38.0</version>
<type>pom</type>
<scope>import</scope>
</dependency>
<!-- <dependency>-->
<!-- <groupId>io.opentelemetry</groupId>-->
<!-- <artifactId>opentelemetry-api</artifactId>-->
<!-- <version>${opentelemetry.version}</version>-->
<!-- </dependency>-->
<!-- <dependency>-->
<!-- <groupId>io.opentelemetry</groupId>-->
<!-- <artifactId>opentelemetry-context</artifactId>-->
<!-- <version>${opentelemetry.version}</version>-->
<!-- </dependency>-->
<!-- END OpenTelemetry -->
<dependency>
<groupId>com.google.api.grpc</groupId>
Expand Down Expand Up @@ -130,37 +136,47 @@
</exclusion>
</exclusions>
</dependency>
<!-- OpenTelemetry -->
<dependency>
<groupId>io.opentelemetry</groupId>
<artifactId>opentelemetry-sdk</artifactId>
<version>${opentelemetry.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>io.opentelemetry</groupId>
<artifactId>opentelemetry-sdk-testing</artifactId>
<version>${opentelemetry.version}</version>
<scope>test</scope>
</dependency>
<!-- &lt;!&ndash; OpenTelemetry &ndash;&gt;-->
<!-- <dependency>-->
<!-- <groupId>io.opentelemetry</groupId>-->
<!-- <artifactId>opentelemetry-api</artifactId>-->
<!--&lt;!&ndash; <version>${opentelemetry.version}</version>&ndash;&gt;-->
<!-- </dependency>-->
<!-- <dependency>-->
<!-- <groupId>io.opentelemetry</groupId>-->
<!-- <artifactId>opentelemetry-context</artifactId>-->
<!--&lt;!&ndash; <version>${opentelemetry.version}</version>&ndash;&gt;-->
<!-- </dependency>-->
<!-- <dependency>-->
<!-- <groupId>io.opentelemetry</groupId>-->
<!-- <artifactId>opentelemetry-sdk</artifactId>-->
<!--&lt;!&ndash; <version>${opentelemetry.version}</version>&ndash;&gt;-->
<!-- <scope>test</scope>-->
<!-- </dependency>-->
<!-- <dependency>-->
<!-- <groupId>io.opentelemetry</groupId>-->
<!-- <artifactId>opentelemetry-sdk-testing</artifactId>-->
<!--&lt;!&ndash; <version>${opentelemetry.version}</version>&ndash;&gt;-->
<!-- <scope>test</scope>-->
<!-- </dependency>-->
<dependency>
<groupId>io.opentelemetry</groupId>
<artifactId>opentelemetry-semconv</artifactId>
<version>${opentelemetry.version}-alpha</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>io.opentelemetry</groupId>
<artifactId>opentelemetry-sdk-trace</artifactId>
<version>${opentelemetry.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>io.opentelemetry</groupId>
<artifactId>opentelemetry-sdk-common</artifactId>
<version>${opentelemetry.version}</version>
<version>1.1.0-alpha</version>
<scope>test</scope>
</dependency>
<!-- <dependency>-->
<!-- <groupId>io.opentelemetry</groupId>-->
<!-- <artifactId>opentelemetry-sdk-trace</artifactId>-->
<!-- <version>${opentelemetry.version}</version>-->
<!-- <scope>test</scope>-->
<!-- </dependency>-->
<!-- <dependency>-->
<!-- <groupId>io.opentelemetry</groupId>-->
<!-- <artifactId>opentelemetry-sdk-common</artifactId>-->
<!-- <version>${opentelemetry.version}</version>-->
<!-- <scope>test</scope>-->
<!-- </dependency>-->
<dependency>
<groupId>com.google.cloud.opentelemetry</groupId>
<artifactId>exporter-trace</artifactId>
Expand Down

0 comments on commit 4270847

Please sign in to comment.