Skip to content

Commit df05909

Browse files
author
Anuraag Agrawal
authored
Update to OTel 1.7 and dependencies (#103)
* Update to OTel 1.7 * Update dependencies * Update licenses
1 parent 795b02e commit df05909

File tree

108 files changed

+1471
-1478
lines changed

Some content is hidden

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

108 files changed

+1471
-1478
lines changed

dependencyManagement/build.gradle.kts

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -26,22 +26,22 @@ data class DependencySet(val group: String, val version: String, val modules: Li
2626

2727
val TEST_SNAPSHOTS = rootProject.findProperty("testUpstreamSnapshots") == "true"
2828

29-
val otelVersion = "1.6.0"
30-
val otelSnapshotVersion = "1.7.0"
29+
val otelVersion = "1.7.0"
30+
val otelSnapshotVersion = "1.8.0"
3131

3232
val DEPENDENCY_BOMS = listOf(
33-
"com.amazonaws:aws-java-sdk-bom:1.12.71",
34-
"com.fasterxml.jackson:jackson-bom:2.12.5",
35-
"com.google.guava:guava-bom:30.1.1-jre",
36-
"com.google.protobuf:protobuf-bom:3.18.0",
37-
"com.linecorp.armeria:armeria-bom:1.11.0",
38-
"io.grpc:grpc-bom:1.40.1",
33+
"com.amazonaws:aws-java-sdk-bom:1.12.91",
34+
"com.fasterxml.jackson:jackson-bom:2.13.0",
35+
"com.google.guava:guava-bom:31.0.1-jre",
36+
"com.google.protobuf:protobuf-bom:3.18.1",
37+
"com.linecorp.armeria:armeria-bom:1.13.0",
38+
"io.grpc:grpc-bom:1.41.0",
3939
"io.opentelemetry.instrumentation:opentelemetry-instrumentation-bom-alpha:${if (!TEST_SNAPSHOTS) "$otelVersion-alpha" else "$otelSnapshotVersion-alpha-SNAPSHOT"}",
4040
"org.apache.logging.log4j:log4j-bom:2.14.1",
41-
"org.junit:junit-bom:5.8.0",
42-
"org.springframework.boot:spring-boot-dependencies:2.5.4",
43-
"org.testcontainers:testcontainers-bom:1.16.0",
44-
"software.amazon.awssdk:bom:2.17.43"
41+
"org.junit:junit-bom:5.8.1",
42+
"org.springframework.boot:spring-boot-dependencies:2.5.5",
43+
"org.testcontainers:testcontainers-bom:1.16.1",
44+
"software.amazon.awssdk:bom:2.17.63"
4545
)
4646

4747
val DEPENDENCY_SETS = listOf(
@@ -68,10 +68,10 @@ val DEPENDENCY_SETS = listOf(
6868
val DEPENDENCIES = listOf(
6969
"commons-logging:commons-logging:1.2",
7070
"com.sparkjava:spark-core:2.9.3",
71-
"com.squareup.okhttp3:okhttp:4.9.1",
72-
"io.opentelemetry.contrib:opentelemetry-aws-xray:$otelVersion",
71+
"com.squareup.okhttp3:okhttp:4.9.2",
72+
"io.opentelemetry.contrib:opentelemetry-aws-xray:1.6.0",
7373
"io.opentelemetry.javaagent:opentelemetry-javaagent:${if (!TEST_SNAPSHOTS) otelVersion else "$otelSnapshotVersion-SNAPSHOT"}",
74-
"net.bytebuddy:byte-buddy:1.11.16"
74+
"net.bytebuddy:byte-buddy:1.11.21"
7575
)
7676

7777
javaPlatform {

instrumentation/log4j-2.13.2/src/main/java/software/amazon/opentelemetry/javaagent/instrumentation/log4j_2_13_2/AwsXrayLog4jInstrumentationModule.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ public AwsXrayLog4jInstrumentationModule() {
3535
// The SPI will be merged with what's in the agent so we don't need to inject it, only our
3636
// provider implementation.
3737
@Override
38-
public List<String> getMuzzleHelperClassNames() {
38+
public List<String> getAdditionalHelperClassNames() {
3939
return Collections.singletonList(
4040
"software.amazon.opentelemetry.javaagent.instrumentation.log4j_2_13_2."
4141
+ "AwsXrayContextDataProvider");

instrumentation/logback-1.0/src/main/java/software/amazon/opentelemetry/javaagent/instrumentation/logback_1_0/AwsXrayLogbackInstrumentationModule.java

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -15,12 +15,10 @@
1515

1616
package software.amazon.opentelemetry.javaagent.instrumentation.logback_1_0;
1717

18-
import io.opentelemetry.api.trace.Span;
1918
import io.opentelemetry.javaagent.extension.instrumentation.InstrumentationModule;
2019
import io.opentelemetry.javaagent.extension.instrumentation.TypeInstrumentation;
2120
import java.util.Collections;
2221
import java.util.List;
23-
import java.util.Map;
2422

2523
public class AwsXrayLogbackInstrumentationModule extends InstrumentationModule {
2624
public AwsXrayLogbackInstrumentationModule() {
@@ -31,10 +29,4 @@ public AwsXrayLogbackInstrumentationModule() {
3129
public List<TypeInstrumentation> typeInstrumentations() {
3230
return Collections.singletonList(new AwsXrayLoggingEventInstrumentation());
3331
}
34-
35-
@Override
36-
public Map<String, String> getMuzzleContextStoreClasses() {
37-
return Collections.singletonMap(
38-
"ch.qos.logback.classic.spi.ILoggingEvent", Span.class.getName());
39-
}
4032
}

instrumentation/logback-1.0/src/main/java/software/amazon/opentelemetry/javaagent/instrumentation/logback_1_0/AwsXrayLoggingEventInstrumentation.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,10 +25,10 @@
2525
import ch.qos.logback.classic.spi.ILoggingEvent;
2626
import io.opentelemetry.api.trace.Span;
2727
import io.opentelemetry.api.trace.SpanContext;
28+
import io.opentelemetry.instrumentation.api.field.VirtualField;
2829
import io.opentelemetry.instrumentation.logback.v1_0.internal.UnionMap;
2930
import io.opentelemetry.javaagent.extension.instrumentation.TypeInstrumentation;
3031
import io.opentelemetry.javaagent.extension.instrumentation.TypeTransformer;
31-
import io.opentelemetry.javaagent.instrumentation.api.InstrumentationContext;
3232
import java.util.Collections;
3333
import java.util.Map;
3434
import net.bytebuddy.asm.Advice;
@@ -69,7 +69,7 @@ public static void onExit(
6969
return;
7070
}
7171

72-
Span currentSpan = InstrumentationContext.get(ILoggingEvent.class, Span.class).get(event);
72+
Span currentSpan = VirtualField.find(ILoggingEvent.class, Span.class).get(event);
7373
if (currentSpan == null || !currentSpan.getSpanContext().isValid()) {
7474
return;
7575
}

0 commit comments

Comments
 (0)