Skip to content

Commit

Permalink
Update to OTel 1.7 and dependencies (#103)
Browse files Browse the repository at this point in the history
* Update to OTel 1.7

* Update dependencies

* Update licenses
  • Loading branch information
Anuraag Agrawal authored Oct 25, 2021
1 parent 795b02e commit df05909
Show file tree
Hide file tree
Showing 108 changed files with 1,471 additions and 1,478 deletions.
30 changes: 15 additions & 15 deletions dependencyManagement/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -26,22 +26,22 @@ data class DependencySet(val group: String, val version: String, val modules: Li

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

val otelVersion = "1.6.0"
val otelSnapshotVersion = "1.7.0"
val otelVersion = "1.7.0"
val otelSnapshotVersion = "1.8.0"

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

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

javaPlatform {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ public AwsXrayLog4jInstrumentationModule() {
// The SPI will be merged with what's in the agent so we don't need to inject it, only our
// provider implementation.
@Override
public List<String> getMuzzleHelperClassNames() {
public List<String> getAdditionalHelperClassNames() {
return Collections.singletonList(
"software.amazon.opentelemetry.javaagent.instrumentation.log4j_2_13_2."
+ "AwsXrayContextDataProvider");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,10 @@

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

import io.opentelemetry.api.trace.Span;
import io.opentelemetry.javaagent.extension.instrumentation.InstrumentationModule;
import io.opentelemetry.javaagent.extension.instrumentation.TypeInstrumentation;
import java.util.Collections;
import java.util.List;
import java.util.Map;

public class AwsXrayLogbackInstrumentationModule extends InstrumentationModule {
public AwsXrayLogbackInstrumentationModule() {
Expand All @@ -31,10 +29,4 @@ public AwsXrayLogbackInstrumentationModule() {
public List<TypeInstrumentation> typeInstrumentations() {
return Collections.singletonList(new AwsXrayLoggingEventInstrumentation());
}

@Override
public Map<String, String> getMuzzleContextStoreClasses() {
return Collections.singletonMap(
"ch.qos.logback.classic.spi.ILoggingEvent", Span.class.getName());
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,10 @@
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.instrumentation.logback.v1_0.internal.UnionMap;
import io.opentelemetry.javaagent.extension.instrumentation.TypeInstrumentation;
import io.opentelemetry.javaagent.extension.instrumentation.TypeTransformer;
import io.opentelemetry.javaagent.instrumentation.api.InstrumentationContext;
import java.util.Collections;
import java.util.Map;
import net.bytebuddy.asm.Advice;
Expand Down Expand Up @@ -69,7 +69,7 @@ public static void onExit(
return;
}

Span currentSpan = InstrumentationContext.get(ILoggingEvent.class, Span.class).get(event);
Span currentSpan = VirtualField.find(ILoggingEvent.class, Span.class).get(event);
if (currentSpan == null || !currentSpan.getSpanContext().isValid()) {
return;
}
Expand Down
435 changes: 218 additions & 217 deletions licenses/licenses.md

Large diffs are not rendered by default.

File renamed without changes.

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

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

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

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

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

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

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

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

This file was deleted.

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

This file was deleted.

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

This file was deleted.

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

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

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

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

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

Loading

0 comments on commit df05909

Please sign in to comment.