From 1bc27ed53dec82b224637d7029af0423e1f96b8e Mon Sep 17 00:00:00 2001 From: maxday Date: Tue, 31 Jan 2023 09:58:21 -0500 Subject: [PATCH 1/2] mask init runtime logs --- tests/integration_tests/run_integration_tests.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tests/integration_tests/run_integration_tests.sh b/tests/integration_tests/run_integration_tests.sh index 4da4f147..639d8fb4 100755 --- a/tests/integration_tests/run_integration_tests.sh +++ b/tests/integration_tests/run_integration_tests.sh @@ -167,7 +167,9 @@ for function_name in "${LAMBDA_HANDLERS[@]}"; do # Strip out run ID (from function name, resource, etc.) perl -p -e "s/$run_id/XXXX/g" | # Normalize data in logged metrics - perl -p -e 's/"(points\\\":\[\[)([0-9]+)/\1XXXX/g' + perl -p -e 's/"(points\\\":\[\[)([0-9]+)/\1XXXX/g' | + # Remove INIT_START log + perl -p -e "s/INIT_START.*//g" ) if [ ! -f $function_snapshot_path ]; then From d645ef14c08574c1633213865d380159aa742304 Mon Sep 17 00:00:00 2001 From: maxday Date: Tue, 31 Jan 2023 10:12:43 -0500 Subject: [PATCH 2/2] update snapshots --- tests/integration_tests/run_integration_tests.sh | 4 ++-- tests/integration_tests/snapshots/logs/error.log | 1 + tests/integration_tests/snapshots/logs/hello.log | 1 + 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/tests/integration_tests/run_integration_tests.sh b/tests/integration_tests/run_integration_tests.sh index 639d8fb4..546e1ef0 100755 --- a/tests/integration_tests/run_integration_tests.sh +++ b/tests/integration_tests/run_integration_tests.sh @@ -40,8 +40,8 @@ if [ -n "$UPDATE_SNAPSHOTS" ]; then fi echo "Building Go binaries" -GOOS=linux go build -ldflags="-s -w" -o bin/hello hello/main.go -GOOS=linux go build -ldflags="-s -w" -o bin/error error/main.go +GOOS=linux GOARCH=amd64 go build -ldflags="-s -w" -o bin/hello hello/main.go +GOOS=linux GOARCH=amd64 go build -ldflags="-s -w" -o bin/error error/main.go # Generate a random 8-character ID to avoid collisions with other runs run_id=$(xxd -l 4 -c 4 -p < /dev/random) diff --git a/tests/integration_tests/snapshots/logs/error.log b/tests/integration_tests/snapshots/logs/error.log index 87f5a916..08e8ca7d 100644 --- a/tests/integration_tests/snapshots/logs/error.log +++ b/tests/integration_tests/snapshots/logs/error.log @@ -1,3 +1,4 @@ + XXXX-XX-XX XX:XX:XX.XXX {"status":"debug","message":"datadog: Will use the API"} START XXXX-XX-XX XX:XX:XX.XXX {"status":"debug","message":"datadog: Merge X-Ray Traces is off, using trace context from Datadog only"} diff --git a/tests/integration_tests/snapshots/logs/hello.log b/tests/integration_tests/snapshots/logs/hello.log index 8d7f2065..811db7e4 100644 --- a/tests/integration_tests/snapshots/logs/hello.log +++ b/tests/integration_tests/snapshots/logs/hello.log @@ -1,3 +1,4 @@ + XXXX-XX-XX XX:XX:XX.XXX {"status":"debug","message":"datadog: Will use the API"} START XXXX-XX-XX XX:XX:XX.XXX {"status":"debug","message":"datadog: Merge X-Ray Traces is off, using trace context from Datadog only"}