Skip to content

Commit 7aa72a4

Browse files
author
chris.agocs
committed
Remove transitive dependency on log4j
1 parent 092fc11 commit 7aa72a4

File tree

7 files changed

+40
-40
lines changed

7 files changed

+40
-40
lines changed

build.gradle

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ repositories {
2323
}
2424

2525
dependencies {
26-
implementation 'com.amazonaws:aws-lambda-java-log4j2:1.4.0'
26+
implementation 'com.amazonaws:aws-lambda-java-core:1.2.1'
2727
implementation 'com.amazonaws:aws-lambda-java-events:2.2.7'
2828
compileOnly 'com.amazonaws:aws-java-sdk-kinesis:1.11.980'
2929
implementation 'com.google.code.gson:gson:2.8.6'
@@ -38,8 +38,8 @@ dependencies {
3838

3939
// Use JUnit test framework
4040
testImplementation 'junit:junit:4.12'
41-
testImplementation 'org.apache.logging.log4j:log4j-api:2.16.0'
42-
testImplementation 'org.apache.logging.log4j:log4j-core:2.16.0'
41+
testImplementation 'org.apache.logging.log4j:log4j-api:2.17.0'
42+
testImplementation 'org.apache.logging.log4j:log4j-core:2.17.0'
4343
testImplementation 'com.github.stefanbirkner:system-rules:1.19.0'
4444
testImplementation 'com.amazonaws:aws-java-sdk-kinesis:1.11.980'
4545

@@ -49,7 +49,7 @@ sourceCompatibility = 1.8
4949
targetCompatibility = 1.8
5050

5151
group = 'com.datadoghq'
52-
version= '0.3.5'
52+
version= '0.3.6'
5353
archivesBaseName = "datadog-lambda-java"
5454
description = "datadog-lambda-java"
5555

tests/testfunctions/snapshots/logs/helloApiGatewayV2_Java11.log

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,9 @@ START RequestId: XXXX Version: $LATEST
1616
[dd.trace 1970-01-01 00:00:00 +0000] [main] INFO datadog.trace.agent.common.writer.WriterFactory - Detected serverless environment. Using PrintingWriter
1717
{"level": "ERROR", "message": "datadog: The request passed to DDLambda contained null headers. Are you sure the handler signature matches the event provided?"}
1818
{"level": "ERROR", "message": "datadog: The request passed to DDLambda contained null headers. Are you sure the handler signature matches the event provided?"}
19-
{"m": "aws.lambda.enhanced.invocations", "v": 1.0, "t": ["memorysize:1024", "account_id:XXXX", "resource:Java-integration-test-dev-helloApiGatewayV2_Java11", "functionname:Java-integration-test-dev-helloApiGatewayV2_Java11", "region:sa-east-1", "datadog_lambda:0.3.3", "cold_start:false", "runtime:xxxx"], "e": 1234567890}
20-
{"m": "aws.lambda.enhanced.invocations", "v": 1.0, "t": ["memorysize:1024", "account_id:XXXX", "resource:Java-integration-test-dev-helloApiGatewayV2_Java11", "functionname:Java-integration-test-dev-helloApiGatewayV2_Java11", "region:sa-east-1", "datadog_lambda:0.3.3", "cold_start:false", "runtime:xxxx"], "e": 1234567890}
21-
{"m": "aws.lambda.enhanced.invocations", "v": 1.0, "t": ["memorysize:1024", "account_id:XXXX", "resource:Java-integration-test-dev-helloApiGatewayV2_Java11", "functionname:Java-integration-test-dev-helloApiGatewayV2_Java11", "region:sa-east-1", "datadog_lambda:0.3.3", "cold_start:true", "runtime:xxxx"], "e": 1234567890}
22-
{"traces": [[{"service": "aws.lambda", "name": "aws.lambda", "resource": "Java-integration-test-dev-helloApiGatewayV2_Java11", "trace_id": "xxxxx", "span_id": "xxxxx", "parent_id": "0", "start": 1234567890, "duration": 12345, "error": 0, "metrics": {"_dd.agent_psr": 1.0}, "meta": {"functionname": "java-integration-test-dev-helloapigatewayv2_java11", "function_arn": "arn:aws:lambda:sa-east-1:123456789012:function:java-integration-test-dev-helloapigatewayv2_java11", "runtime-id": "00000000-0000-0000-0000-000000000000", "language": "jvm", "thread.name": "main", "request_id": "00000000-0000-0000-0000-000000000000", "datadog_lambda": "0.3.3", "thread.id": "1", "cold_start": "false", "resource_names": "Java-integration-test-dev-helloApiGatewayV2_Java11", "function_version": "$LATEST"}}]]}
23-
{"traces": [[{"service": "aws.lambda", "name": "aws.lambda", "resource": "Java-integration-test-dev-helloApiGatewayV2_Java11", "trace_id": "xxxxx", "span_id": "xxxxx", "parent_id": "0", "start": 1234567890, "duration": 12345, "error": 0, "metrics": {"_dd.agent_psr": 1.0}, "meta": {"functionname": "java-integration-test-dev-helloapigatewayv2_java11", "function_arn": "arn:aws:lambda:sa-east-1:123456789012:function:java-integration-test-dev-helloapigatewayv2_java11", "runtime-id": "00000000-0000-0000-0000-000000000000", "language": "jvm", "thread.name": "main", "request_id": "00000000-0000-0000-0000-000000000000", "datadog_lambda": "0.3.3", "thread.id": "1", "cold_start": "false", "resource_names": "Java-integration-test-dev-helloApiGatewayV2_Java11", "function_version": "$LATEST"}}]]}
24-
{"traces": [[{"service": "aws.lambda", "name": "aws.lambda", "resource": "Java-integration-test-dev-helloApiGatewayV2_Java11", "trace_id": "xxxxx", "span_id": "xxxxx", "parent_id": "0", "start": 1234567890, "duration": 12345, "error": 0, "metrics": {"_dd.agent_psr": 1.0}, "meta": {"functionname": "java-integration-test-dev-helloapigatewayv2_java11", "function_arn": "arn:aws:lambda:sa-east-1:123456789012:function:java-integration-test-dev-helloapigatewayv2_java11", "runtime-id": "00000000-0000-0000-0000-000000000000", "language": "jvm", "thread.name": "main", "request_id": "00000000-0000-0000-0000-000000000000", "datadog_lambda": "0.3.3", "thread.id": "1", "cold_start": "true", "resource_names": "Java-integration-test-dev-helloApiGatewayV2_Java11", "function_version": "$LATEST"}}]]}
19+
{"m": "aws.lambda.enhanced.invocations", "v": 1.0, "t": ["memorysize:1024", "account_id:XXXX", "resource:Java-integration-test-dev-helloApiGatewayV2_Java11", "functionname:Java-integration-test-dev-helloApiGatewayV2_Java11", "region:sa-east-1", "datadog_lambda:0.3.6", "cold_start:false", "runtime:xxxx"], "e": 1234567890}
20+
{"m": "aws.lambda.enhanced.invocations", "v": 1.0, "t": ["memorysize:1024", "account_id:XXXX", "resource:Java-integration-test-dev-helloApiGatewayV2_Java11", "functionname:Java-integration-test-dev-helloApiGatewayV2_Java11", "region:sa-east-1", "datadog_lambda:0.3.6", "cold_start:false", "runtime:xxxx"], "e": 1234567890}
21+
{"m": "aws.lambda.enhanced.invocations", "v": 1.0, "t": ["memorysize:1024", "account_id:XXXX", "resource:Java-integration-test-dev-helloApiGatewayV2_Java11", "functionname:Java-integration-test-dev-helloApiGatewayV2_Java11", "region:sa-east-1", "datadog_lambda:0.3.6", "cold_start:true", "runtime:xxxx"], "e": 1234567890}
22+
{"traces": [[{"service": "aws.lambda", "name": "aws.lambda", "resource": "Java-integration-test-dev-helloApiGatewayV2_Java11", "trace_id": "xxxxx", "span_id": "xxxxx", "parent_id": "0", "start": 1234567890, "duration": 12345, "error": 0, "metrics": {"_dd.agent_psr": 1.0}, "meta": {"functionname": "java-integration-test-dev-helloapigatewayv2_java11", "function_arn": "arn:aws:lambda:sa-east-1:123456789012:function:java-integration-test-dev-helloapigatewayv2_java11", "runtime-id": "00000000-0000-0000-0000-000000000000", "language": "jvm", "thread.name": "main", "request_id": "00000000-0000-0000-0000-000000000000", "datadog_lambda": "0.3.6", "thread.id": "1", "cold_start": "false", "resource_names": "Java-integration-test-dev-helloApiGatewayV2_Java11", "function_version": "$LATEST"}}]]}
23+
{"traces": [[{"service": "aws.lambda", "name": "aws.lambda", "resource": "Java-integration-test-dev-helloApiGatewayV2_Java11", "trace_id": "xxxxx", "span_id": "xxxxx", "parent_id": "0", "start": 1234567890, "duration": 12345, "error": 0, "metrics": {"_dd.agent_psr": 1.0}, "meta": {"functionname": "java-integration-test-dev-helloapigatewayv2_java11", "function_arn": "arn:aws:lambda:sa-east-1:123456789012:function:java-integration-test-dev-helloapigatewayv2_java11", "runtime-id": "00000000-0000-0000-0000-000000000000", "language": "jvm", "thread.name": "main", "request_id": "00000000-0000-0000-0000-000000000000", "datadog_lambda": "0.3.6", "thread.id": "1", "cold_start": "false", "resource_names": "Java-integration-test-dev-helloApiGatewayV2_Java11", "function_version": "$LATEST"}}]]}
24+
{"traces": [[{"service": "aws.lambda", "name": "aws.lambda", "resource": "Java-integration-test-dev-helloApiGatewayV2_Java11", "trace_id": "xxxxx", "span_id": "xxxxx", "parent_id": "0", "start": 1234567890, "duration": 12345, "error": 0, "metrics": {"_dd.agent_psr": 1.0}, "meta": {"functionname": "java-integration-test-dev-helloapigatewayv2_java11", "function_arn": "arn:aws:lambda:sa-east-1:123456789012:function:java-integration-test-dev-helloapigatewayv2_java11", "runtime-id": "00000000-0000-0000-0000-000000000000", "language": "jvm", "thread.name": "main", "request_id": "00000000-0000-0000-0000-000000000000", "datadog_lambda": "0.3.6", "thread.id": "1", "cold_start": "true", "resource_names": "Java-integration-test-dev-helloApiGatewayV2_Java11", "function_version": "$LATEST"}}]]}

tests/testfunctions/snapshots/logs/helloApiGatewayV2_Java8.log

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,9 @@ START RequestId: XXXX Version: $LATEST
1515
[dd.trace 1970-01-01 00:00:00 +0000] [main] INFO datadog.trace.agent.common.writer.WriterFactory - Detected serverless environment. Using PrintingWriter
1616
{"level": "ERROR", "message": "datadog: The request passed to DDLambda contained null headers. Are you sure the handler signature matches the event provided?"}
1717
{"level": "ERROR", "message": "datadog: The request passed to DDLambda contained null headers. Are you sure the handler signature matches the event provided?"}
18-
{"m": "aws.lambda.enhanced.invocations", "v": 1.0, "t": ["memorysize:1024", "account_id:XXXX", "resource:Java-integration-test-dev-helloApiGatewayV2_Java8", "functionname:Java-integration-test-dev-helloApiGatewayV2_Java8", "region:sa-east-1", "datadog_lambda:0.3.3", "cold_start:false", "runtime:xxxx"], "e": 1234567890}
19-
{"m": "aws.lambda.enhanced.invocations", "v": 1.0, "t": ["memorysize:1024", "account_id:XXXX", "resource:Java-integration-test-dev-helloApiGatewayV2_Java8", "functionname:Java-integration-test-dev-helloApiGatewayV2_Java8", "region:sa-east-1", "datadog_lambda:0.3.3", "cold_start:false", "runtime:xxxx"], "e": 1234567890}
20-
{"m": "aws.lambda.enhanced.invocations", "v": 1.0, "t": ["memorysize:1024", "account_id:XXXX", "resource:Java-integration-test-dev-helloApiGatewayV2_Java8", "functionname:Java-integration-test-dev-helloApiGatewayV2_Java8", "region:sa-east-1", "datadog_lambda:0.3.3", "cold_start:true", "runtime:xxxx"], "e": 1234567890}
21-
{"traces": [[{"service": "aws.lambda", "name": "aws.lambda", "resource": "Java-integration-test-dev-helloApiGatewayV2_Java8", "trace_id": "xxxxx", "span_id": "xxxxx", "parent_id": "0", "start": 1234567890, "duration": 12345, "error": 0, "metrics": {"_dd.agent_psr": 1.0}, "meta": {"functionname": "java-integration-test-dev-helloapigatewayv2_java8", "function_arn": "arn:aws:lambda:sa-east-1:123456789012:function:java-integration-test-dev-helloapigatewayv2_java8", "runtime-id": "00000000-0000-0000-0000-000000000000", "language": "jvm", "thread.name": "main", "request_id": "00000000-0000-0000-0000-000000000000", "datadog_lambda": "0.3.3", "thread.id": "1", "cold_start": "false", "resource_names": "Java-integration-test-dev-helloApiGatewayV2_Java8", "function_version": "$LATEST"}}]]}
22-
{"traces": [[{"service": "aws.lambda", "name": "aws.lambda", "resource": "Java-integration-test-dev-helloApiGatewayV2_Java8", "trace_id": "xxxxx", "span_id": "xxxxx", "parent_id": "0", "start": 1234567890, "duration": 12345, "error": 0, "metrics": {"_dd.agent_psr": 1.0}, "meta": {"functionname": "java-integration-test-dev-helloapigatewayv2_java8", "function_arn": "arn:aws:lambda:sa-east-1:123456789012:function:java-integration-test-dev-helloapigatewayv2_java8", "runtime-id": "00000000-0000-0000-0000-000000000000", "language": "jvm", "thread.name": "main", "request_id": "00000000-0000-0000-0000-000000000000", "datadog_lambda": "0.3.3", "thread.id": "1", "cold_start": "false", "resource_names": "Java-integration-test-dev-helloApiGatewayV2_Java8", "function_version": "$LATEST"}}]]}
23-
{"traces": [[{"service": "aws.lambda", "name": "aws.lambda", "resource": "Java-integration-test-dev-helloApiGatewayV2_Java8", "trace_id": "xxxxx", "span_id": "xxxxx", "parent_id": "0", "start": 1234567890, "duration": 12345, "error": 0, "metrics": {"_dd.agent_psr": 1.0}, "meta": {"functionname": "java-integration-test-dev-helloapigatewayv2_java8", "function_arn": "arn:aws:lambda:sa-east-1:123456789012:function:java-integration-test-dev-helloapigatewayv2_java8", "runtime-id": "00000000-0000-0000-0000-000000000000", "language": "jvm", "thread.name": "main", "request_id": "00000000-0000-0000-0000-000000000000", "datadog_lambda": "0.3.3", "thread.id": "1", "cold_start": "true", "resource_names": "Java-integration-test-dev-helloApiGatewayV2_Java8", "function_version": "$LATEST"}}]]}
18+
{"m": "aws.lambda.enhanced.invocations", "v": 1.0, "t": ["memorysize:1024", "account_id:XXXX", "resource:Java-integration-test-dev-helloApiGatewayV2_Java8", "functionname:Java-integration-test-dev-helloApiGatewayV2_Java8", "region:sa-east-1", "datadog_lambda:0.3.6", "cold_start:false", "runtime:xxxx"], "e": 1234567890}
19+
{"m": "aws.lambda.enhanced.invocations", "v": 1.0, "t": ["memorysize:1024", "account_id:XXXX", "resource:Java-integration-test-dev-helloApiGatewayV2_Java8", "functionname:Java-integration-test-dev-helloApiGatewayV2_Java8", "region:sa-east-1", "datadog_lambda:0.3.6", "cold_start:false", "runtime:xxxx"], "e": 1234567890}
20+
{"m": "aws.lambda.enhanced.invocations", "v": 1.0, "t": ["memorysize:1024", "account_id:XXXX", "resource:Java-integration-test-dev-helloApiGatewayV2_Java8", "functionname:Java-integration-test-dev-helloApiGatewayV2_Java8", "region:sa-east-1", "datadog_lambda:0.3.6", "cold_start:true", "runtime:xxxx"], "e": 1234567890}
21+
{"traces": [[{"service": "aws.lambda", "name": "aws.lambda", "resource": "Java-integration-test-dev-helloApiGatewayV2_Java8", "trace_id": "xxxxx", "span_id": "xxxxx", "parent_id": "0", "start": 1234567890, "duration": 12345, "error": 0, "metrics": {"_dd.agent_psr": 1.0}, "meta": {"functionname": "java-integration-test-dev-helloapigatewayv2_java8", "function_arn": "arn:aws:lambda:sa-east-1:123456789012:function:java-integration-test-dev-helloapigatewayv2_java8", "runtime-id": "00000000-0000-0000-0000-000000000000", "language": "jvm", "thread.name": "main", "request_id": "00000000-0000-0000-0000-000000000000", "datadog_lambda": "0.3.6", "thread.id": "1", "cold_start": "false", "resource_names": "Java-integration-test-dev-helloApiGatewayV2_Java8", "function_version": "$LATEST"}}]]}
22+
{"traces": [[{"service": "aws.lambda", "name": "aws.lambda", "resource": "Java-integration-test-dev-helloApiGatewayV2_Java8", "trace_id": "xxxxx", "span_id": "xxxxx", "parent_id": "0", "start": 1234567890, "duration": 12345, "error": 0, "metrics": {"_dd.agent_psr": 1.0}, "meta": {"functionname": "java-integration-test-dev-helloapigatewayv2_java8", "function_arn": "arn:aws:lambda:sa-east-1:123456789012:function:java-integration-test-dev-helloapigatewayv2_java8", "runtime-id": "00000000-0000-0000-0000-000000000000", "language": "jvm", "thread.name": "main", "request_id": "00000000-0000-0000-0000-000000000000", "datadog_lambda": "0.3.6", "thread.id": "1", "cold_start": "false", "resource_names": "Java-integration-test-dev-helloApiGatewayV2_Java8", "function_version": "$LATEST"}}]]}
23+
{"traces": [[{"service": "aws.lambda", "name": "aws.lambda", "resource": "Java-integration-test-dev-helloApiGatewayV2_Java8", "trace_id": "xxxxx", "span_id": "xxxxx", "parent_id": "0", "start": 1234567890, "duration": 12345, "error": 0, "metrics": {"_dd.agent_psr": 1.0}, "meta": {"functionname": "java-integration-test-dev-helloapigatewayv2_java8", "function_arn": "arn:aws:lambda:sa-east-1:123456789012:function:java-integration-test-dev-helloapigatewayv2_java8", "runtime-id": "00000000-0000-0000-0000-000000000000", "language": "jvm", "thread.name": "main", "request_id": "00000000-0000-0000-0000-000000000000", "datadog_lambda": "0.3.6", "thread.id": "1", "cold_start": "true", "resource_names": "Java-integration-test-dev-helloApiGatewayV2_Java8", "function_version": "$LATEST"}}]]}

0 commit comments

Comments
 (0)