From e0f3c9548cc83662813ebe06e9747f6b457d8415 Mon Sep 17 00:00:00 2001 From: Anuraag Agrawal Date: Fri, 23 Apr 2021 13:57:43 +0900 Subject: [PATCH] Raise lambda flush timeout for java. --- java/layer-javaagent/scripts/otel-handler | 2 ++ java/layer-wrapper/scripts/otel-handler | 2 ++ java/layer-wrapper/scripts/otel-proxy-handler | 2 ++ java/layer-wrapper/scripts/otel-stream-handler | 2 ++ 4 files changed, 8 insertions(+) diff --git a/java/layer-javaagent/scripts/otel-handler b/java/layer-javaagent/scripts/otel-handler index d5ab5dfea4..6e4cd91f15 100755 --- a/java/layer-javaagent/scripts/otel-handler +++ b/java/layer-javaagent/scripts/otel-handler @@ -6,4 +6,6 @@ if [[ $OTEL_RESOURCE_ATTRIBUTES != *"service.name="* ]]; then export OTEL_RESOURCE_ATTRIBUTES="service.name=${AWS_LAMBDA_FUNCTION_NAME},${OTEL_RESOURCE_ATTRIBUTES}" fi +export OTEL_INSTRUMENTATION_AWS_LAMBDA_FLUSH_TIMEOUT=10000 + exec "$@" diff --git a/java/layer-wrapper/scripts/otel-handler b/java/layer-wrapper/scripts/otel-handler index 6b4ba38014..6142db77dd 100755 --- a/java/layer-wrapper/scripts/otel-handler +++ b/java/layer-wrapper/scripts/otel-handler @@ -7,4 +7,6 @@ if [[ $OTEL_RESOURCE_ATTRIBUTES != *"service.name="* ]]; then export OTEL_RESOURCE_ATTRIBUTES="service.name=${AWS_LAMBDA_FUNCTION_NAME},${OTEL_RESOURCE_ATTRIBUTES}" fi +export OTEL_INSTRUMENTATION_AWS_LAMBDA_FLUSH_TIMEOUT=10000 + exec "$@" diff --git a/java/layer-wrapper/scripts/otel-proxy-handler b/java/layer-wrapper/scripts/otel-proxy-handler index ff03457e42..a406753c8a 100755 --- a/java/layer-wrapper/scripts/otel-proxy-handler +++ b/java/layer-wrapper/scripts/otel-proxy-handler @@ -7,4 +7,6 @@ if [[ $OTEL_RESOURCE_ATTRIBUTES != *"service.name="* ]]; then export OTEL_RESOURCE_ATTRIBUTES="service.name=${AWS_LAMBDA_FUNCTION_NAME},${OTEL_RESOURCE_ATTRIBUTES}" fi +export OTEL_INSTRUMENTATION_AWS_LAMBDA_FLUSH_TIMEOUT=10000 + exec "$@" diff --git a/java/layer-wrapper/scripts/otel-stream-handler b/java/layer-wrapper/scripts/otel-stream-handler index fb9cbafbee..9192a8b6a6 100755 --- a/java/layer-wrapper/scripts/otel-stream-handler +++ b/java/layer-wrapper/scripts/otel-stream-handler @@ -7,4 +7,6 @@ if [[ $OTEL_RESOURCE_ATTRIBUTES != *"service.name="* ]]; then export OTEL_RESOURCE_ATTRIBUTES="service.name=${AWS_LAMBDA_FUNCTION_NAME},${OTEL_RESOURCE_ATTRIBUTES}" fi +export OTEL_INSTRUMENTATION_AWS_LAMBDA_FLUSH_TIMEOUT=10000 + exec "$@"