Skip to content

Commit 24ffa66

Browse files
committed
Merge branch 'main' of github.com:open-telemetry/opentelemetry-java-instrumentation into indy-jaxrs
2 parents 5776b56 + f16388c commit 24ffa66

File tree

9 files changed

+16
-20
lines changed

9 files changed

+16
-20
lines changed

benchmark-overhead/build.gradle.kts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
plugins {
22
id("java")
3-
id("com.diffplug.spotless") version "7.0.4"
3+
id("com.diffplug.spotless") version "7.1.0"
44
}
55

66
spotless {
@@ -22,7 +22,7 @@ dependencies {
2222
testImplementation("org.testcontainers:postgresql:1.21.3")
2323
testImplementation("org.junit.jupiter:junit-jupiter-api")
2424
testImplementation("org.junit.jupiter:junit-jupiter-params")
25-
testImplementation("com.squareup.okhttp3:okhttp:4.12.0")
25+
testImplementation("com.squareup.okhttp3:okhttp:5.0.0")
2626
testImplementation("org.jooq:joox:2.0.1")
2727
testImplementation("com.jayway.jsonpath:json-path:2.9.0")
2828
testImplementation("org.slf4j:slf4j-simple:2.0.17")

conventions/build.gradle.kts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
plugins {
22
`kotlin-dsl`
33
// When updating, update below in dependencies too
4-
id("com.diffplug.spotless") version "7.0.4"
4+
id("com.diffplug.spotless") version "7.1.0"
55
}
66

77
spotless {
@@ -54,7 +54,7 @@ dependencies {
5454
implementation("org.apache.maven:maven-aether-provider:3.3.9")
5555

5656
// When updating, update above in plugins too
57-
implementation("com.diffplug.spotless:spotless-plugin-gradle:7.0.4")
57+
implementation("com.diffplug.spotless:spotless-plugin-gradle:7.1.0")
5858
implementation("com.google.guava:guava:33.4.8-jre")
5959
implementation("gradle.plugin.com.google.protobuf:protobuf-gradle-plugin:0.8.18")
6060
implementation("com.gradleup.shadow:shadow-gradle-plugin:8.3.8")

examples/distro/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ buildscript {
1212
}
1313
}
1414
dependencies {
15-
classpath "com.diffplug.spotless:spotless-plugin-gradle:7.0.4"
15+
classpath "com.diffplug.spotless:spotless-plugin-gradle:7.1.0"
1616
classpath "com.gradleup.shadow:shadow-gradle-plugin:8.3.8"
1717
classpath "io.opentelemetry.instrumentation:gradle-plugins:2.18.0-alpha-SNAPSHOT"
1818
}

examples/distro/instrumentation/servlet-3/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ dependencies {
2727
exclude group: 'org.eclipse.jetty', module: 'jetty-server'
2828
}
2929

30-
testImplementation "com.squareup.okhttp3:okhttp:4.12.0"
30+
testImplementation "com.squareup.okhttp3:okhttp:5.0.0"
3131
testImplementation "javax.servlet:javax.servlet-api:3.0.1"
3232
testImplementation "org.eclipse.jetty:jetty-server:8.2.0.v20160908"
3333
testImplementation "org.eclipse.jetty:jetty-servlet:8.2.0.v20160908"

examples/distro/smoke-tests/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ dependencies {
66
testImplementation("org.testcontainers:testcontainers:1.21.3")
77
testImplementation("com.fasterxml.jackson.core:jackson-databind:2.19.1")
88
testImplementation("com.google.protobuf:protobuf-java-util:4.31.1")
9-
testImplementation("com.squareup.okhttp3:okhttp:4.12.0")
9+
testImplementation("com.squareup.okhttp3:okhttp:5.0.0")
1010
testImplementation("io.opentelemetry.proto:opentelemetry-proto:1.7.0-alpha")
1111
testImplementation("io.opentelemetry:opentelemetry-api")
1212

examples/extension/build.gradle

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ plugins {
1111
See https://imperceptiblethoughts.com/shadow/ for more details about Shadow plugin.
1212
*/
1313
id "com.gradleup.shadow" version "8.3.8"
14-
id "com.diffplug.spotless" version "7.0.4"
14+
id "com.diffplug.spotless" version "7.1.0"
1515

1616
id "io.opentelemetry.instrumentation.muzzle-generation" version "2.18.0-alpha-SNAPSHOT"
1717
id "io.opentelemetry.instrumentation.muzzle-check" version "2.18.0-alpha-SNAPSHOT"
@@ -100,7 +100,7 @@ dependencies {
100100
testImplementation("org.testcontainers:testcontainers:1.21.3")
101101
testImplementation("com.fasterxml.jackson.core:jackson-databind:2.19.1")
102102
testImplementation("com.google.protobuf:protobuf-java-util:4.31.1")
103-
testImplementation("com.squareup.okhttp3:okhttp:4.12.0")
103+
testImplementation("com.squareup.okhttp3:okhttp:5.0.0")
104104
testImplementation("io.opentelemetry:opentelemetry-api")
105105
testImplementation("io.opentelemetry.proto:opentelemetry-proto:1.7.0-alpha")
106106

instrumentation/jmx-metrics/library/src/main/java/io/opentelemetry/instrumentation/jmx/engine/UnitConverter.java

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -33,17 +33,12 @@ class UnitConverter {
3333
* @param sourceUnit a source unit supported by requested converter
3434
* @param targetUnit a target unit supported by requested converter
3535
* @return an instance of converter, or {@literal null} if {@code sourceUnit} is {@literal null}
36-
* or empty, which means that there is no conversion needed.
37-
* @throws IllegalArgumentException if {@code targetUnit} is empty, or matching converter was not
38-
* found for provided units.
36+
* or empty or if {@code targetUnit} is empty, which means that there is no conversion needed.
37+
* @throws IllegalArgumentException if matching converter was not found for provided units.
3938
*/
4039
@Nullable
4140
public static UnitConverter getInstance(@Nullable String sourceUnit, String targetUnit) {
42-
if (targetUnit.isEmpty()) {
43-
throw new IllegalArgumentException("Non empty targetUnit must be provided");
44-
}
45-
46-
if (sourceUnit == null || sourceUnit.isEmpty()) {
41+
if (sourceUnit == null || sourceUnit.isEmpty() || targetUnit.isEmpty()) {
4742
// No conversion is needed
4843
return null;
4944
}

instrumentation/jmx-metrics/library/src/test/java/io/opentelemetry/instrumentation/jmx/engine/UnitConverterTest.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,9 @@
55

66
package io.opentelemetry.instrumentation.jmx.engine;
77

8+
import static org.assertj.core.api.Assertions.assertThat;
89
import static org.assertj.core.api.Assertions.assertThatThrownBy;
910
import static org.junit.jupiter.api.Assertions.assertEquals;
10-
import static org.junit.jupiter.api.Assertions.assertNull;
1111

1212
import org.junit.jupiter.api.Test;
1313
import org.junit.jupiter.params.ParameterizedTest;
@@ -58,10 +58,11 @@ void shouldHandleUnsupportedConversion(String sourceUnit, String targetUnit) {
5858
@CsvSource({
5959
", s", // null -> "s"
6060
"'', s", // "" -> "s"
61+
"1, ''", // empty target unit
6162
})
6263
void shouldSkipConversionWhenSourceUnitNotSpecified(String sourceUnit, String targetUnit) {
6364
UnitConverter converter = UnitConverter.getInstance(sourceUnit, targetUnit);
64-
assertNull(converter);
65+
assertThat(converter).isNull();
6566
}
6667

6768
@Test

smoke-tests/build.gradle.kts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ otelJava {
1515
maxJavaVersionForTests.set(JavaVersion.VERSION_11)
1616
}
1717

18-
val dockerJavaVersion = "3.5.2"
18+
val dockerJavaVersion = "3.5.3"
1919
dependencies {
2020
testCompileOnly("com.google.auto.value:auto-value-annotations")
2121
testAnnotationProcessor("com.google.auto.value:auto-value")

0 commit comments

Comments
 (0)