Skip to content

Commit c3cf57c

Browse files
authored
Update dependencies and Otel to v1.32.6 (#965)
*Description of changes:* Patch commit for Java v1.32.6 Release MCM. Generated License Report: ``` ------------------------------------------------------------ :dependencyManagement Project Dependency Updates (report to plain text file) ------------------------------------------------------------ The following dependencies are using the latest release version: - com.sparkjava:spark-core:2.9.4 - com.squareup.okhttp3:okhttp:4.12.0 The following dependencies have later release versions: - com.amazonaws:aws-java-sdk-bom [1.12.599 -> 1.12.779] https://aws.amazon.com/sdkforjava - com.fasterxml.jackson:jackson-bom [2.16.0 -> 2.18.2] https://github.com/FasterXML/jackson-bom - com.github.ben-manes.versions:com.github.ben-manes.versions.gradle.plugin [0.50.0 -> 0.51.0] - com.google.guava:guava-bom [33.0.0-jre -> 33.3.1-jre] https://github.com/google/guava - com.google.protobuf:protobuf-bom [3.25.1 -> 4.29.1] https://developers.google.com/protocol-buffers/ - com.linecorp.armeria:armeria-bom [1.26.4 -> 1.31.2] https://armeria.dev/ - commons-logging:commons-logging [1.2 -> 1.3.4] https://commons.apache.org/proper/commons-logging/ - io.grpc:grpc-bom [1.59.1 -> 1.68.2] https://github.com/grpc/grpc-java - io.opentelemetry.contrib:opentelemetry-aws-resources [1.32.0-alpha -> 1.41.0-alpha] https://github.com/open-telemetry/opentelemetry-java-contrib - io.opentelemetry.contrib:opentelemetry-aws-xray [1.32.0 -> 1.41.0] https://github.com/open-telemetry/opentelemetry-java-contrib - io.opentelemetry.instrumentation:opentelemetry-instrumentation-bom-alpha [1.32.1-adot3-alpha -> 2.10.0-alpha] https://github.com/open-telemetry/opentelemetry-java-instrumentation - io.opentelemetry.javaagent:opentelemetry-javaagent [1.32.1-adot3 -> 2.10.0] https://github.com/open-telemetry/opentelemetry-java-instrumentation - io.opentelemetry.proto:opentelemetry-proto [1.0.0-alpha -> 1.4.0-alpha] https://github.com/open-telemetry/opentelemetry-proto-java - net.bytebuddy:byte-buddy [1.14.10 -> 1.15.10] https://bytebuddy.net - org.apache.logging.log4j:log4j-bom [2.21.1 -> 2.24.2] https://logging.apache.org/log4j/2.x/ - org.assertj:assertj-core [3.24.2 -> 3.26.3] https://assertj.github.io/doc/#assertj-core - org.curioswitch.curiostack:protobuf-jackson [2.2.0 -> 2.6.0] https://github.com/curioswitch/protobuf-jackson - org.junit:junit-bom [5.10.1 -> 5.11.3] https://junit.org/junit5/ - org.slf4j:slf4j-api [1.7.36 -> 2.0.16] http://www.slf4j.org - org.slf4j:slf4j-simple [1.7.36 -> 2.0.16] http://www.slf4j.org - org.springframework.boot:spring-boot-dependencies [2.7.17 -> 3.4.0] https://spring.io/projects/spring-boot - org.testcontainers:testcontainers-bom [1.19.3 -> 1.20.4] https://java.testcontainers.org - software.amazon.awssdk:bom [2.21.33 -> 2.29.29] https://aws.amazon.com/sdkforjava Gradle release-candidate updates: - Gradle: [8.8 -> 8.11.1] ``` By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
1 parent eae57c5 commit c3cf57c

File tree

75 files changed

+8812
-337
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

75 files changed

+8812
-337
lines changed

.github/patches/opentelemetry-java-instrumentation.patch

Lines changed: 87 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2057,15 +2057,99 @@ index 53390c8d85..692cd005eb 100644
20572057
}
20582058

20592059
def "send #operation async request with builder #builder.class.getName() mocked response"() {
2060+
diff --git a/instrumentation/jmx-metrics/javaagent/src/main/java/io/opentelemetry/instrumentation/javaagent/jmx/JmxMetricInsightInstaller.java b/instrumentation/jmx-metrics/javaagent/src/main/java/io/opentelemetry/instrumentation/javaagent/jmx/JmxMetricInsightInstaller.java
2061+
index 69b3c09c90..74a6f75ffb 100644
2062+
--- a/instrumentation/jmx-metrics/javaagent/src/main/java/io/opentelemetry/instrumentation/javaagent/jmx/JmxMetricInsightInstaller.java
2063+
+++ b/instrumentation/jmx-metrics/javaagent/src/main/java/io/opentelemetry/instrumentation/javaagent/jmx/JmxMetricInsightInstaller.java
2064+
@@ -20,6 +20,7 @@ import io.opentelemetry.sdk.autoconfigure.spi.ConfigProperties;
2065+
import java.io.InputStream;
2066+
import java.nio.file.Files;
2067+
import java.nio.file.Paths;
2068+
+import java.time.Duration;
2069+
import java.util.List;
2070+
2071+
/** An {@link AgentListener} that enables JMX metrics during agent startup. */
2072+
@@ -32,22 +33,22 @@ public class JmxMetricInsightInstaller implements AgentListener {
2073+
2074+
if (config.getBoolean("otel.jmx.enabled", true)) {
2075+
JmxMetricInsight service =
2076+
- JmxMetricInsight.createService(GlobalOpenTelemetry.get(), beanDiscoveryDelay(config));
2077+
+ JmxMetricInsight.createService(
2078+
+ GlobalOpenTelemetry.get(), beanDiscoveryDelay(config).toMillis());
2079+
MetricConfiguration conf = buildMetricConfiguration(config);
2080+
service.start(conf);
2081+
}
2082+
}
2083+
2084+
- private static long beanDiscoveryDelay(ConfigProperties configProperties) {
2085+
- Long discoveryDelay = configProperties.getLong("otel.jmx.discovery.delay");
2086+
+ private static Duration beanDiscoveryDelay(ConfigProperties configProperties) {
2087+
+ Duration discoveryDelay = configProperties.getDuration("otel.jmx.discovery.delay");
2088+
if (discoveryDelay != null) {
2089+
return discoveryDelay;
2090+
}
2091+
2092+
// If discovery delay has not been configured, have a peek at the metric export interval.
2093+
// It makes sense for both of these values to be similar.
2094+
- long exportInterval = configProperties.getLong("otel.metric.export.interval", 60000);
2095+
- return exportInterval;
2096+
+ return configProperties.getDuration("otel.metric.export.interval", Duration.ofMinutes(1));
2097+
}
2098+
2099+
private static String resourceFor(String platform) {
2100+
diff --git a/instrumentation/jmx-metrics/library/src/main/java/io/opentelemetry/instrumentation/jmx/engine/BeanFinder.java b/instrumentation/jmx-metrics/library/src/main/java/io/opentelemetry/instrumentation/jmx/engine/BeanFinder.java
2101+
index 8b0fd636be..b9856f1dc9 100644
2102+
--- a/instrumentation/jmx-metrics/library/src/main/java/io/opentelemetry/instrumentation/jmx/engine/BeanFinder.java
2103+
+++ b/instrumentation/jmx-metrics/library/src/main/java/io/opentelemetry/instrumentation/jmx/engine/BeanFinder.java
2104+
@@ -25,7 +25,13 @@ class BeanFinder {
2105+
2106+
private final MetricRegistrar registrar;
2107+
private MetricConfiguration conf;
2108+
- private final ScheduledExecutorService exec = Executors.newSingleThreadScheduledExecutor();
2109+
+ private final ScheduledExecutorService exec =
2110+
+ Executors.newSingleThreadScheduledExecutor(
2111+
+ runnable -> {
2112+
+ Thread result = new Thread(runnable, "jmx_bean_finder");
2113+
+ result.setDaemon(true);
2114+
+ return result;
2115+
+ });
2116+
private final long discoveryDelay;
2117+
private final long maxDelay;
2118+
private long delay = 1000; // number of milliseconds until first attempt to discover MBeans
2119+
@@ -39,12 +45,18 @@ class BeanFinder {
2120+
void discoverBeans(MetricConfiguration conf) {
2121+
this.conf = conf;
2122+
2123+
- if (!conf.isEmpty()) {
2124+
- // Issue 9336: Corner case: PlatformMBeanServer will remain unitialized until a direct
2125+
- // reference to it is made. This call makes sure that the PlatformMBeanServer will be in
2126+
- // the set of MBeanServers reported by MBeanServerFactory.
2127+
- ManagementFactory.getPlatformMBeanServer();
2128+
- }
2129+
+ exec.schedule(
2130+
+ () -> {
2131+
+ // Issue 9336: Corner case: PlatformMBeanServer will remain unitialized until a direct
2132+
+ // reference to it is made. This call makes sure that the PlatformMBeanServer will be in
2133+
+ // the set of MBeanServers reported by MBeanServerFactory.
2134+
+ // Issue 11143: This call initializes java.util.logging.LogManager. We should not call it
2135+
+ // before application has had a chance to configure custom log manager. This is needed for
2136+
+ // wildfly.
2137+
+ ManagementFactory.getPlatformMBeanServer();
2138+
+ },
2139+
+ discoveryDelay,
2140+
+ TimeUnit.MILLISECONDS);
2141+
2142+
exec.schedule(
2143+
new Runnable() {
20602144
diff --git a/version.gradle.kts b/version.gradle.kts
2061-
index fdf57bdbea..c38a2e00f3 100644
2145+
index fdf57bdbea..1bd7ae7f60 100644
20622146
--- a/version.gradle.kts
20632147
+++ b/version.gradle.kts
20642148
@@ -1,5 +1,5 @@
20652149
-val stableVersion = "1.32.1"
20662150
-val alphaVersion = "1.32.1-alpha"
2067-
+val stableVersion = "1.32.1-adot2"
2068-
+val alphaVersion = "1.32.1-adot2-alpha"
2151+
+val stableVersion = "1.32.1-adot3"
2152+
+val alphaVersion = "1.32.1-adot3-alpha"
20692153

20702154
allprojects {
20712155
if (findProperty("otel.stable") != "true") {

dependencyManagement/build.gradle.kts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ data class DependencySet(val group: String, val version: String, val modules: Li
2727
val TEST_SNAPSHOTS = rootProject.findProperty("testUpstreamSnapshots") == "true"
2828

2929
// This is the version of the upstream instrumentation BOM
30-
val otelVersion = "1.32.1-adot2"
30+
val otelVersion = "1.32.1-adot3"
3131
val otelSnapshotVersion = "1.33.0"
3232
val otelAlphaVersion = if (!TEST_SNAPSHOTS) "$otelVersion-alpha" else "$otelSnapshotVersion-alpha-SNAPSHOT"
3333
val otelJavaAgentVersion = if (!TEST_SNAPSHOTS) otelVersion else "$otelSnapshotVersion-SNAPSHOT"

licenses/annotations-2.29.23.jar/META-INF/LICENSE.txt

Lines changed: 206 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

licenses/annotations-2.29.23.jar/META-INF/NOTICE.txt

Lines changed: 25 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)