diff --git a/awsagentprovider/build.gradle.kts b/awsagentprovider/build.gradle.kts index 741c474..4600258 100644 --- a/awsagentprovider/build.gradle.kts +++ b/awsagentprovider/build.gradle.kts @@ -18,11 +18,6 @@ plugins { id("com.github.johnrengelman.shadow") version "5.2.0" } -java { - sourceCompatibility = JavaVersion.VERSION_1_7 - targetCompatibility = JavaVersion.VERSION_1_7 -} - base { archivesBaseName = "aws-opentelemetry-agent-customizer" } diff --git a/awsagentprovider/src/test/java/com/softwareaws/xray/opentelemetry/exporters/AwsTracerProviderFactoryTest.java b/awsagentprovider/src/test/java/com/softwareaws/xray/opentelemetry/exporters/AwsTracerProviderFactoryTest.java index c33fd78..df573ab 100644 --- a/awsagentprovider/src/test/java/com/softwareaws/xray/opentelemetry/exporters/AwsTracerProviderFactoryTest.java +++ b/awsagentprovider/src/test/java/com/softwareaws/xray/opentelemetry/exporters/AwsTracerProviderFactoryTest.java @@ -18,7 +18,6 @@ import static org.assertj.core.api.Assertions.assertThat; import com.google.common.primitives.Ints; -import io.opentelemetry.trace.TraceId; import io.opentelemetry.trace.TracerProvider; import java.util.concurrent.TimeUnit; import org.junit.jupiter.api.RepeatedTest; @@ -32,8 +31,7 @@ class AwsTracerProviderFactoryTest { void providerGeneratesXrayIds() { int startTimeSecs = (int) TimeUnit.MILLISECONDS.toSeconds(System.currentTimeMillis()); var span = TRACER_PROVIDER.get("test").spanBuilder("test").startSpan(); - byte[] traceId = new byte[TraceId.getSize()]; - span.getContext().getTraceId().copyBytesTo(traceId, 0); + byte[] traceId = span.getContext().getTraceIdBytes(); int epoch = Ints.fromBytes(traceId[0], traceId[1], traceId[2], traceId[3]); assertThat(epoch).isGreaterThanOrEqualTo(startTimeSecs); } diff --git a/build.gradle.kts b/build.gradle.kts index 2a262be..e492358 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -60,8 +60,8 @@ allprojects { plugins.withId("java") { java { - sourceCompatibility = JavaVersion.VERSION_1_7 - targetCompatibility = JavaVersion.VERSION_1_7 + sourceCompatibility = JavaVersion.VERSION_1_8 + targetCompatibility = JavaVersion.VERSION_1_8 } dependencies { diff --git a/dependencyManagement/build.gradle.kts b/dependencyManagement/build.gradle.kts index c131b02..53d65d5 100644 --- a/dependencyManagement/build.gradle.kts +++ b/dependencyManagement/build.gradle.kts @@ -43,14 +43,14 @@ val DEPENDENCY_SETS = listOf( ), DependencySet( "io.opentelemetry.instrumentation.auto", - "0.9.0-20200914.041229-7", + "0.9.0-20200927.201622-41", listOf( "opentelemetry-javaagent" ) ), DependencySet( "io.opentelemetry", - "0.8.0", + "0.9.0-20200925.025016-49", listOf( "opentelemetry-api", "opentelemetry-exporters-logging", @@ -59,7 +59,7 @@ val DEPENDENCY_SETS = listOf( ), DependencySet( "io.opentelemetry", - "0.8.0", + "0.9.0-20200925.025016-49", listOf( "opentelemetry-context-prop", "opentelemetry-extension-trace-propagators", @@ -70,7 +70,7 @@ val DEPENDENCY_SETS = listOf( ), DependencySet( "io.opentelemetry", - "0.8.0", + "0.9.0-20200925.025016-49", listOf( "opentelemetry-sdk-common", "opentelemetry-sdk-correlation-context", diff --git a/smoke-tests/runner/src/test/java/io/awsobservability/instrumentation/smoketests/runner/SpringBootSmokeTest.java b/smoke-tests/runner/src/test/java/io/awsobservability/instrumentation/smoketests/runner/SpringBootSmokeTest.java index 206c2e0..c498e4b 100644 --- a/smoke-tests/runner/src/test/java/io/awsobservability/instrumentation/smoketests/runner/SpringBootSmokeTest.java +++ b/smoke-tests/runner/src/test/java/io/awsobservability/instrumentation/smoketests/runner/SpringBootSmokeTest.java @@ -57,6 +57,8 @@ class SpringBootSmokeTest { private static final Logger logger = LoggerFactory.getLogger(SpringBootSmokeTest.class); + private static final Logger backendLogger = LoggerFactory.getLogger("backend"); + private static final Logger applicationLogger = LoggerFactory.getLogger("application"); private static final String AGENT_PATH = System.getProperty("io.awsobservability.instrumentation.smoketests.runner.agentPath"); @@ -99,9 +101,9 @@ public ExportTraceServiceRequest deserialize( new GenericContainer<>("ghcr.io/anuraaga/smoke-tests-fake-backend") .withExposedPorts(8080) .waitingFor(Wait.forHttp("/health").forPort(8080)) + .withLogConsumer(new Slf4jLogConsumer(backendLogger)) .withNetwork(network) - .withNetworkAliases("backend") - .withLogConsumer(new Slf4jLogConsumer(logger)); + .withNetworkAliases("backend"); @Container private static final GenericContainer application = @@ -109,13 +111,13 @@ public ExportTraceServiceRequest deserialize( .dependsOn(backend) .withExposedPorts(8080) .withNetwork(network) - .withLogConsumer(new Slf4jLogConsumer(logger)) + .withLogConsumer(new Slf4jLogConsumer(applicationLogger)) .withCopyFileToContainer( MountableFile.forHostPath(AGENT_PATH), "/opentelemetry-javaagent-all.jar") .withEnv("JAVA_TOOL_OPTIONS", "-javaagent:/opentelemetry-javaagent-all.jar") .withEnv("OTEL_BSP_MAX_EXPORT_BATCH", "1") .withEnv("OTEL_BSP_SCHEDULE_DELAY", "10") - .withEnv("OTEL_OTLP_ENDPOINT", "backend:8080"); + .withEnv("OTEL_EXPORTER_OTLP_SPAN_ENDPOINT", "backend:8080"); private static final TypeReference> EXPORT_TRACE_SERVICE_REQUEST_LIST = new TypeReference<>() {}; @@ -182,7 +184,7 @@ void hello() { private List getExported() { List exported = ImmutableList.of(); - for (int i = 0; i < 20; i++) { + for (int i = 0; i < 100; i++) { try (var content = backendClient .get("/get-requests")