Remove afterburner from aws-lambda tests
MODIFY
instrumentation/aws-lambda-1.0/library/aws-lambda-1.0-library.gradle
instrumentation/aws-lambda-1.0/library/aws-lambda-1.0-library.gradle
@@ -27,7 +27,6 @@ dependencies {
compileOnly(
'com.fasterxml.jackson.core:jackson-databind:2.10.5.1',
- 'com.fasterxml.jackson.module:jackson-module-afterburner:2.9.10',
'commons-io:commons-io:2.2')
compileOnly deps.slf4j
@@ -38,7 +37,6 @@ dependencies {
testImplementation(
'com.fasterxml.jackson.core:jackson-databind:2.10.5.1',
- 'com.fasterxml.jackson.module:jackson-module-afterburner:2.9.10',
'commons-io:commons-io:2.2')
testImplementation deps.opentelemetryTraceProps

MODIFY
instrumentation/aws-lambda-1.0/library/src/main/java/io/opentelemetry/instrumentation/awslambda/v1_0/HeadersFactory.java
instrumentation/aws-lambda-1.0/library/src/main/java/io/opentelemetry/instrumentation/awslambda/v1_0/HeadersFactory.java
@@ -8,7 +8,6 @@ package io.opentelemetry.instrumentation.awslambda.v1_0;
import com.fasterxml.jackson.core.JsonFactory;
import com.fasterxml.jackson.core.JsonParser;
import com.fasterxml.jackson.databind.ObjectMapper;
-import com.fasterxml.jackson.module.afterburner.AfterburnerModule;
import java.io.InputStream;
import java.util.Map;
import org.checkerframework.checker.nullness.qual.Nullable;
@@ -21,10 +20,6 @@ class HeadersFactory {
private static final ObjectMapper OBJECT_MAPPER = new ObjectMapper();
- static {
- OBJECT_MAPPER.registerModule(new AfterburnerModule());
- }
-
@Nullable
static Map<String, String> ofStream(InputStream inputStream) {
try (JsonParser jParser = new JsonFactory().createParser(inputStream)) {

MODIFY
instrumentation/aws-lambda-1.0/library/src/test/java/io/opentelemetry/instrumentation/awslambda/v1_0/ParentContextExtractorTest.java
instrumentation/aws-lambda-1.0/library/src/test/java/io/opentelemetry/instrumentation/awslambda/v1_0/ParentContextExtractorTest.java
@@ -16,6 +16,7 @@ import io.opentelemetry.context.Context;
import io.opentelemetry.context.propagation.ContextPropagators;
import io.opentelemetry.extension.trace.propagation.B3Propagator;
import java.util.Map;
+import org.junit.AfterClass;
import org.junit.BeforeClass;
import org.junit.Rule;
import org.junit.Test;
@@ -35,6 +36,11 @@ public class ParentContextExtractorTest {
OpenTelemetry.getPropagating(ContextPropagators.create(B3Propagator.getInstance())));
}
+ @AfterClass
+ public static void tearDown() {
+ GlobalOpenTelemetry.resetForTest();
+ }
+
@Test
public void shouldUseHttpIfAwsParentNotSampled() {
// given

Remove afterburner from aws-lambda tests (#2271)