Skip to content

Commit e4ac8d8

Browse files
authored
Update OTEL 14.0 dependencies and license (#174)
* update dep * modify * link * Update build.gradle.kts * trigger PR build * Correct the typo * Modify the changes w.r.t to upstream releases
1 parent d486431 commit e4ac8d8

File tree

54 files changed

+5730
-237
lines changed

Some content is hidden

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

54 files changed

+5730
-237
lines changed

RELEASING.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
## Preparing for a release
44

5-
Before beginning a release, make sure dependencies are updated.
5+
Before beginning a release, make sure [dependencies](https://github.com/aws-observability/aws-otel-java-instrumentation/blob/main/dependencyManagement/build.gradle.kts) are updated.
66

77
Run `./gradlew dependencyUpdates` to get a report on what dependencies have updates and apply them to
88
`dependencyManagement` and `settings.gradle.kts`.

dependencyManagement/build.gradle.kts

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -27,24 +27,24 @@ 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 only version that affects the released artifact.
30-
val otelVersion = "1.13.1"
30+
val otelVersion = "1.14.0"
3131
val otelSnapshotVersion = "1.15.0"
3232

3333
// All versions below are only used in testing and do not affect the released artifact.
3434

3535
val DEPENDENCY_BOMS = listOf(
36-
"com.amazonaws:aws-java-sdk-bom:1.12.208",
37-
"com.fasterxml.jackson:jackson-bom:2.13.2.20220328",
36+
"com.amazonaws:aws-java-sdk-bom:1.12.227",
37+
"com.fasterxml.jackson:jackson-bom:2.13.3",
3838
"com.google.guava:guava-bom:31.1-jre",
39-
"com.google.protobuf:protobuf-bom:3.20.1",
39+
"com.google.protobuf:protobuf-bom:3.21.0-rc-2",
4040
"com.linecorp.armeria:armeria-bom:1.16.0",
4141
"io.grpc:grpc-bom:1.46.0",
4242
"io.opentelemetry.instrumentation:opentelemetry-instrumentation-bom-alpha:${if (!TEST_SNAPSHOTS) "$otelVersion-alpha" else "$otelSnapshotVersion-alpha-SNAPSHOT"}",
4343
"org.apache.logging.log4j:log4j-bom:2.17.2",
4444
"org.junit:junit-bom:5.8.2",
4545
"org.springframework.boot:spring-boot-dependencies:2.6.7",
4646
"org.testcontainers:testcontainers-bom:1.17.1",
47-
"software.amazon.awssdk:bom:2.17.179"
47+
"software.amazon.awssdk:bom:2.17.194"
4848
)
4949

5050
val DEPENDENCY_SETS = listOf(
@@ -75,7 +75,7 @@ val DEPENDENCIES = listOf(
7575
"io.opentelemetry.contrib:opentelemetry-aws-xray:1.13.0",
7676
"io.opentelemetry.proto:opentelemetry-proto:0.11.0-alpha",
7777
"io.opentelemetry.javaagent:opentelemetry-javaagent:${if (!TEST_SNAPSHOTS) otelVersion else "$otelSnapshotVersion-SNAPSHOT"}",
78-
"net.bytebuddy:byte-buddy:1.12.9"
78+
"net.bytebuddy:byte-buddy:1.12.10"
7979
)
8080

8181
javaPlatform {

instrumentation/logback-1.0/build.gradle.kts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@ dependencies {
2424
compileOnly("io.opentelemetry:opentelemetry-api")
2525
compileOnly("io.opentelemetry.instrumentation:opentelemetry-logback-mdc-1.0")
2626
compileOnly("io.opentelemetry.javaagent:opentelemetry-javaagent-extension-api")
27-
compileOnly("io.opentelemetry.javaagent:opentelemetry-javaagent-instrumentation-api")
2827
compileOnly("net.bytebuddy:byte-buddy")
2928

3029
compileOnly("ch.qos.logback:logback-classic:1.0.0")

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

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -23,10 +23,11 @@
2323
import static net.bytebuddy.matcher.ElementMatchers.takesArguments;
2424

2525
import ch.qos.logback.classic.spi.ILoggingEvent;
26-
import io.opentelemetry.api.trace.Span;
2726
import io.opentelemetry.api.trace.SpanContext;
28-
import io.opentelemetry.instrumentation.api.field.VirtualField;
27+
import io.opentelemetry.context.Context;
28+
import io.opentelemetry.instrumentation.api.util.VirtualField;
2929
import io.opentelemetry.instrumentation.logback.v1_0.internal.UnionMap;
30+
import io.opentelemetry.javaagent.bootstrap.Java8BytecodeBridge;
3031
import io.opentelemetry.javaagent.extension.instrumentation.TypeInstrumentation;
3132
import io.opentelemetry.javaagent.extension.instrumentation.TypeTransformer;
3233
import java.util.Collections;
@@ -69,12 +70,16 @@ public static void onExit(
6970
return;
7071
}
7172

72-
Span currentSpan = VirtualField.find(ILoggingEvent.class, Span.class).get(event);
73-
if (currentSpan == null || !currentSpan.getSpanContext().isValid()) {
73+
Context context = VirtualField.find(ILoggingEvent.class, Context.class).get(event);
74+
if (context == null) {
75+
return;
76+
}
77+
78+
SpanContext spanContext = Java8BytecodeBridge.spanFromContext(context).getSpanContext();
79+
if (!spanContext.isValid()) {
7480
return;
7581
}
7682

77-
SpanContext spanContext = currentSpan.getSpanContext();
7883
String value =
7984
"1-"
8085
+ spanContext.getTraceId().substring(0, 8)

licenses/annotations-2.17.194.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.17.194.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)