Skip to content

Commit bb9515b

Browse files
authored
Enable http instrumentations for lambda (#144)
*Issue #, if available:* Enabling Javascript http libraries in order to fix the broken xray propagation issue when calling downstream APIGW in Lambda layer. Performance testing results: https://quip-amazon.com/asqwA9QvcfjI/Performance-Testing-Enabled-Instrumentations-in-Lambda-Layer *Description of changes:* By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.
1 parent e09a123 commit bb9515b

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

lambda-layer/packages/layer/scripts/otel-instrument

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -44,19 +44,19 @@ if [ -z "${OTEL_EXPORTER_OTLP_PROTOCOL}" ]; then
4444
fi
4545

4646
# If both OTEL_NODE_ENABLED_INSTRUMENTATIONS and OTEL_NODE_DISABLED_INSTRUMENTATIONS are not configured,
47-
# set OTEL_NODE_ENABLED_INSTRUMENTATIONS="aws-sdk,aws-lambda"
47+
# set OTEL_NODE_ENABLED_INSTRUMENTATIONS="aws-sdk,aws-lambda,http"
4848
if [ -z "${OTEL_NODE_ENABLED_INSTRUMENTATIONS}" ] && [ -z "${OTEL_NODE_DISABLED_INSTRUMENTATIONS}" ]; then
49-
export OTEL_NODE_ENABLED_INSTRUMENTATIONS="aws-sdk,aws-lambda"
49+
export OTEL_NODE_ENABLED_INSTRUMENTATIONS="aws-sdk,aws-lambda,http"
5050

5151
# Else if OTEL_NODE_ENABLED_INSTRUMENTATIONS is configured and OTEL_NODE_DISABLED_INSTRUMENTATIONS is not,
52-
# append OTEL_NODE_ENABLED_INSTRUMENTATIONS with "aws-lambda"
52+
# append OTEL_NODE_ENABLED_INSTRUMENTATIONS with "aws-lambda,http"
5353
elif [ -n "${OTEL_NODE_ENABLED_INSTRUMENTATIONS}" ] && [ -z "${OTEL_NODE_DISABLED_INSTRUMENTATIONS}" ]; then
54-
export OTEL_NODE_ENABLED_INSTRUMENTATIONS="${OTEL_NODE_ENABLED_INSTRUMENTATIONS},aws-lambda"
54+
export OTEL_NODE_ENABLED_INSTRUMENTATIONS="${OTEL_NODE_ENABLED_INSTRUMENTATIONS},aws-lambda,http"
5555

5656
# Else if both OTEL_NODE_ENABLED_INSTRUMENTATIONS and OTEL_NODE_DISABLED_INSTRUMENTATIONS are configured,
57-
# append OTEL_NODE_ENABLED_INSTRUMENTATIONS with "aws-lambda"
57+
# append OTEL_NODE_ENABLED_INSTRUMENTATIONS with "aws-lambda,http"
5858
elif [ -n "${OTEL_NODE_ENABLED_INSTRUMENTATIONS}" ] && [ -n "${OTEL_NODE_DISABLED_INSTRUMENTATIONS}" ]; then
59-
export OTEL_NODE_ENABLED_INSTRUMENTATIONS="${OTEL_NODE_ENABLED_INSTRUMENTATIONS},aws-lambda"
59+
export OTEL_NODE_ENABLED_INSTRUMENTATIONS="${OTEL_NODE_ENABLED_INSTRUMENTATIONS},aws-lambda,http"
6060

6161
# Else do nothing
6262
fi
@@ -68,7 +68,7 @@ fi
6868

6969
# - Set the propagators
7070
if [[ -z "$OTEL_PROPAGATORS" ]]; then
71-
export OTEL_PROPAGATORS="tracecontext,baggage,xray"
71+
export OTEL_PROPAGATORS="xray,tracecontext,baggage,b3,b3multi"
7272
fi
7373

7474
# - Set Application Signals configuration

0 commit comments

Comments
 (0)