Skip to content

Commit

Permalink
Bug 37492472 - [37481437->25.03] Update OpenTelemetry to latest versi…
Browse files Browse the repository at this point in the history
…on (merge main -> ce/main @ 113624)

[git-p4: depot-paths = "//dev/coherence-ce/main/": change = 113625]
  • Loading branch information
rlubke committed Jan 17, 2025
1 parent 3150ae9 commit a118917
Show file tree
Hide file tree
Showing 9 changed files with 29 additions and 26 deletions.
8 changes: 5 additions & 3 deletions prj/coherence-dependencies/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -240,7 +240,9 @@
<!-- NOTE: this version should ideally be in sync' with that used by Helidon
This is not always possible if we need to bump versions for CVE's -->
<netty.version>4.1.115.Final</netty.version>
<opentelemetry.version>1.29.0</opentelemetry.version>
<opentelemetry.version>1.46.0</opentelemetry.version>
<opentelemetry.grpc.version>2.11.0-alpha</opentelemetry.grpc.version>
<!-- only used for testing -->
<opentelemetry.proto.version>1.0.0-alpha</opentelemetry.proto.version>
<opentracing.grpc.version>0.2.3</opentracing.grpc.version>
<opentracing.version>0.33.0</opentracing.version>
Expand Down Expand Up @@ -363,11 +365,11 @@
<dependency>
<groupId>io.opentelemetry.instrumentation</groupId>
<artifactId>opentelemetry-grpc-1.6</artifactId>
<version>${opentelemetry.version}-alpha</version>
<version>${opentelemetry.grpc.version}</version>
</dependency>
<dependency>
<groupId>io.opentelemetry</groupId>
<artifactId>opentelemetry-api-events</artifactId>
<artifactId>opentelemetry-api-incubator</artifactId>
<version>${opentelemetry.version}-alpha</version>
</dependency>
<dependency>
Expand Down
2 changes: 1 addition & 1 deletion prj/coherence-javadoc/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -320,7 +320,7 @@
<dependency>
<groupId>io.opentelemetry.instrumentation</groupId>
<artifactId>opentelemetry-grpc-1.6</artifactId>
<version>${opentelemetry.version}-alpha</version>
<version>${opentelemetry.grpc.version}</version>
<optional>true</optional>
<scope>provided</scope>
</dependency>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2023, Oracle and/or its affiliates.
* Copyright (c) 2023, 2025, Oracle and/or its affiliates.
*
* Licensed under the Universal Permissive License v 1.0 as shown at
* https://oss.oracle.com/licenses/upl.
Expand Down Expand Up @@ -62,7 +62,7 @@ public <T> T underlying()
// ----- data members ---------------------------------------------------

/**
* The underlying {@code OpenTracing} {@link io.opentelemetry.context.Scope}.
* The underlying {@code OpenTelemetry} {@link io.opentelemetry.context.Scope}.
*/
protected final io.opentelemetry.context.Scope f_scope;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2023, 2024, Oracle and/or its affiliates.
* Copyright (c) 2023, 2025, Oracle and/or its affiliates.
*
* Licensed under the Universal Permissive License v 1.0 as shown at
* https://oss.oracle.com/licenses/upl.
Expand All @@ -17,7 +17,7 @@
import io.opentelemetry.api.GlobalOpenTelemetry;
import io.opentelemetry.api.OpenTelemetry;

import io.opentelemetry.api.events.GlobalEventEmitterProvider;
import io.opentelemetry.api.incubator.events.GlobalEventLoggerProvider;

import io.opentelemetry.api.trace.TracerProvider;

Expand Down Expand Up @@ -87,7 +87,7 @@ public Control initialize(Dependencies dependencies)
if (INTERNAL_NOOP.equals(underlying))
{
GlobalOpenTelemetry.resetForTest();
GlobalEventEmitterProvider.resetForTest();
GlobalEventLoggerProvider.resetForTest();
}

GlobalOpenTelemetry.get(); // initialize OT
Expand Down Expand Up @@ -120,7 +120,7 @@ public synchronized void close()
}

GlobalOpenTelemetry.resetForTest();
GlobalEventEmitterProvider.resetForTest();
GlobalEventLoggerProvider.resetForTest();
GlobalOpenTelemetry.set(INTERNAL_NOOP);
}
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2023, 2024, Oracle and/or its affiliates.
* Copyright (c) 2023, 2025, Oracle and/or its affiliates.
*
* Licensed under the Universal Permissive License v 1.0 as shown at
* https://oss.oracle.com/licenses/upl.
Expand Down Expand Up @@ -54,7 +54,7 @@ public TracingShim loadTracingShim()
// ----- helper methods -------------------------------------------------

/**
* Ensures the expected OpenTracing classes are available and are compatible with
* Ensures the expected OpenTelemetry classes are available and are compatible with
* Coherence's tracing implementation.
*
* @return {@code true} if the classpath looks good, otherwise {@code false}
Expand Down Expand Up @@ -117,9 +117,10 @@ protected boolean ensureClassPresent(String sClassName, ClassLoader classLoader)
* in order to enable tracing.
*/
protected static final Map<String, String> EXPECTED_CLASSES = Map.of(
"io.opentelemetry.api.OpenTelemetry", "opentelemetry-api",
"io.opentelemetry.context.Context", "opentelemetry-context",
"io.opentelemetry.sdk.OpenTelemetrySdk", "opentracing-util");
"io.opentelemetry.api.OpenTelemetry", "opentelemetry-api",
"io.opentelemetry.api.incubator.events.GlobalEventLoggerProvider", "opentelemetry-api-incubator",
"io.opentelemetry.context.Context", "opentelemetry-context",
"io.opentelemetry.sdk.OpenTelemetrySdk", "opentelemetry-sdk");

/**
* A flag that allows the explicit disabling of OpenTelemetry.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2023, Oracle and/or its affiliates.
* Copyright (c) 2023, 2025, Oracle and/or its affiliates.
*
* Licensed under the Universal Permissive License v 1.0 as shown at
* https://oss.oracle.com/licenses/upl.
Expand All @@ -11,7 +11,7 @@
import java.util.Objects;

/**
* {@link SpanContext} adapter for {@code OpenTracing}.
* {@link SpanContext} adapter for {@code OpenTelemetry}.
*
* @author rl 8.25.2023
* @since 24.03
Expand All @@ -22,7 +22,7 @@ public class OpenTelemetrySpanContext
// ----- constructors ---------------------------------------------------

/**
* Construct a new {@code OpenTracingSpanContext}.
* Construct a new {@code OpenTelemetrySpanContext}.
*
* @param spanContext the {@link io.opentelemetry.api.trace.SpanContext} delegate
*
Expand Down Expand Up @@ -104,7 +104,7 @@ public String toString()
// ----- data members ---------------------------------------------------

/**
* The underlying {@code OpenTracing} {@link io.opentelemetry.api.trace.SpanContext}.
* The underlying {@code OpenTelemetry} {@link io.opentelemetry.api.trace.SpanContext}.
*/
protected final io.opentelemetry.api.trace.SpanContext f_spanContext;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2023, 2024, Oracle and/or its affiliates.
* Copyright (c) 2023, 2025, Oracle and/or its affiliates.
*
* Licensed under the Universal Permissive License v 1.0 as shown at
* https://oss.oracle.com/licenses/upl.
Expand All @@ -26,7 +26,7 @@

import io.opentelemetry.api.OpenTelemetry;

import io.opentelemetry.api.events.GlobalEventEmitterProvider;
import io.opentelemetry.api.incubator.events.GlobalEventLoggerProvider;

import io.opentelemetry.api.trace.Tracer;

Expand Down Expand Up @@ -254,7 +254,7 @@ public void testTelemetryLifecycleNotManagedByCoherence()
{
propsTest.forEach((key, value) -> System.clearProperty(key.toString()));
GlobalOpenTelemetry.resetForTest();
GlobalEventEmitterProvider.resetForTest();
GlobalEventLoggerProvider.resetForTest();
}
}

Expand Down
4 changes: 2 additions & 2 deletions prj/test/functional/tracing/opentelemetry/grpc/pom.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
Copyright (c) 2000, 2024, Oracle and/or its affiliates.
Copyright (c) 2000, 2025, Oracle and/or its affiliates.
Licensed under the Universal Permissive License v 1.0 as shown at
https://oss.oracle.com/licenses/upl.
Expand Down Expand Up @@ -44,7 +44,7 @@
<dependency>
<groupId>io.opentelemetry.instrumentation</groupId>
<artifactId>opentelemetry-grpc-1.6</artifactId>
<version>${opentelemetry.version}-alpha</version>
<version>${opentelemetry.grpc.version}</version>
</dependency>
</dependencies>
</project>
4 changes: 2 additions & 2 deletions prj/test/functional/tracing/opentelemetry/pom.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
~ Copyright (c) 2023, Oracle and/or its affiliates.
~ Copyright (c) 2023, 2025, Oracle and/or its affiliates.
~
~ Licensed under the Universal Permissive License v 1.0 as shown at
~ https://oss.oracle.com/licenses/upl.
Expand Down Expand Up @@ -41,7 +41,7 @@
</dependency>
<dependency>
<groupId>io.opentelemetry</groupId>
<artifactId>opentelemetry-api-events</artifactId>
<artifactId>opentelemetry-api-incubator</artifactId>
</dependency>
<dependency>
<groupId>io.opentelemetry</groupId>
Expand Down

0 comments on commit a118917

Please sign in to comment.