Skip to content

Commit

Permalink
Update OTEL 14.0 dependencies and license (#174)
Browse files Browse the repository at this point in the history
* update dep

* modify

* link

* Update build.gradle.kts

* trigger PR build

* Correct the typo

* Modify the changes w.r.t to upstream releases
  • Loading branch information
vasireddy99 authored Jun 17, 2022
1 parent d486431 commit e4ac8d8
Show file tree
Hide file tree
Showing 54 changed files with 5,730 additions and 237 deletions.
2 changes: 1 addition & 1 deletion RELEASING.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

## Preparing for a release

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

Run `./gradlew dependencyUpdates` to get a report on what dependencies have updates and apply them to
`dependencyManagement` and `settings.gradle.kts`.
Expand Down
12 changes: 6 additions & 6 deletions dependencyManagement/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -27,24 +27,24 @@ data class DependencySet(val group: String, val version: String, val modules: Li
val TEST_SNAPSHOTS = rootProject.findProperty("testUpstreamSnapshots") == "true"

// This is the only version that affects the released artifact.
val otelVersion = "1.13.1"
val otelVersion = "1.14.0"
val otelSnapshotVersion = "1.15.0"

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

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

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

javaPlatform {
Expand Down
1 change: 0 additions & 1 deletion instrumentation/logback-1.0/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ dependencies {
compileOnly("io.opentelemetry:opentelemetry-api")
compileOnly("io.opentelemetry.instrumentation:opentelemetry-logback-mdc-1.0")
compileOnly("io.opentelemetry.javaagent:opentelemetry-javaagent-extension-api")
compileOnly("io.opentelemetry.javaagent:opentelemetry-javaagent-instrumentation-api")
compileOnly("net.bytebuddy:byte-buddy")

compileOnly("ch.qos.logback:logback-classic:1.0.0")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,11 @@
import static net.bytebuddy.matcher.ElementMatchers.takesArguments;

import ch.qos.logback.classic.spi.ILoggingEvent;
import io.opentelemetry.api.trace.Span;
import io.opentelemetry.api.trace.SpanContext;
import io.opentelemetry.instrumentation.api.field.VirtualField;
import io.opentelemetry.context.Context;
import io.opentelemetry.instrumentation.api.util.VirtualField;
import io.opentelemetry.instrumentation.logback.v1_0.internal.UnionMap;
import io.opentelemetry.javaagent.bootstrap.Java8BytecodeBridge;
import io.opentelemetry.javaagent.extension.instrumentation.TypeInstrumentation;
import io.opentelemetry.javaagent.extension.instrumentation.TypeTransformer;
import java.util.Collections;
Expand Down Expand Up @@ -69,12 +70,16 @@ public static void onExit(
return;
}

Span currentSpan = VirtualField.find(ILoggingEvent.class, Span.class).get(event);
if (currentSpan == null || !currentSpan.getSpanContext().isValid()) {
Context context = VirtualField.find(ILoggingEvent.class, Context.class).get(event);
if (context == null) {
return;
}

SpanContext spanContext = Java8BytecodeBridge.spanFromContext(context).getSpanContext();
if (!spanContext.isValid()) {
return;
}

SpanContext spanContext = currentSpan.getSpanContext();
String value =
"1-"
+ spanContext.getTraceId().substring(0, 8)
Expand Down
206 changes: 206 additions & 0 deletions licenses/annotations-2.17.194.jar/META-INF/LICENSE.txt

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

25 changes: 25 additions & 0 deletions licenses/annotations-2.17.194.jar/META-INF/NOTICE.txt

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit e4ac8d8

Please sign in to comment.