File tree 9 files changed +46
-3
lines changed
nodejs/packages/layer/scripts
9 files changed +46
-3
lines changed Original file line number Diff line number Diff line change 1
1
#! /bin/bash
2
2
3
+ set -ef -o pipefail
4
+
3
5
export JAVA_TOOL_OPTIONS=" -javaagent:/opt/opentelemetry-javaagent.jar ${JAVA_TOOL_OPTIONS} "
4
6
5
7
if [[ $OTEL_RESOURCE_ATTRIBUTES != * " service.name=" * ]]; then
6
8
export OTEL_RESOURCE_ATTRIBUTES=" service.name=${AWS_LAMBDA_FUNCTION_NAME} ,${OTEL_RESOURCE_ATTRIBUTES} "
7
9
fi
8
10
11
+ if [[ -z " $OTEL_PROPAGATORS " ]]; then
12
+ export OTEL_PROPAGATORS=" tracecontext,baggage,xray"
13
+ fi
14
+
9
15
export OTEL_INSTRUMENTATION_AWS_LAMBDA_FLUSH_TIMEOUT=10000
10
16
11
17
# #######################################
Original file line number Diff line number Diff line change 1
1
#! /bin/bash
2
2
3
+ set -ef -o pipefail
4
+
3
5
export OTEL_INSTRUMENTATION_AWS_LAMBDA_HANDLER=" $_HANDLER "
4
6
export _HANDLER=" io.opentelemetry.instrumentation.awslambdaevents.v2_2.TracingRequestWrapper"
5
7
6
8
if [[ $OTEL_RESOURCE_ATTRIBUTES != * " service.name=" * ]]; then
7
9
export OTEL_RESOURCE_ATTRIBUTES=" service.name=${AWS_LAMBDA_FUNCTION_NAME} ,${OTEL_RESOURCE_ATTRIBUTES} "
8
10
fi
9
11
12
+ if [[ -z " $OTEL_PROPAGATORS " ]]; then
13
+ export OTEL_PROPAGATORS=" tracecontext,baggage,xray"
14
+ fi
15
+
10
16
export OTEL_INSTRUMENTATION_AWS_LAMBDA_FLUSH_TIMEOUT=10000
11
17
12
18
# java17 runtime puts the handler to run as a command line argument and seems to prefer
Original file line number Diff line number Diff line change 1
1
#! /bin/bash
2
2
3
+ set -ef -o pipefail
4
+
3
5
export OTEL_INSTRUMENTATION_AWS_LAMBDA_HANDLER=" $_HANDLER "
4
6
export _HANDLER=" io.opentelemetry.instrumentation.awslambdaevents.v2_2.TracingRequestApiGatewayWrapper"
5
7
6
8
if [[ $OTEL_RESOURCE_ATTRIBUTES != * " service.name=" * ]]; then
7
9
export OTEL_RESOURCE_ATTRIBUTES=" service.name=${AWS_LAMBDA_FUNCTION_NAME} ,${OTEL_RESOURCE_ATTRIBUTES} "
8
10
fi
9
11
12
+ if [[ -z " $OTEL_PROPAGATORS " ]]; then
13
+ export OTEL_PROPAGATORS=" tracecontext,baggage,xray"
14
+ fi
15
+
10
16
export OTEL_INSTRUMENTATION_AWS_LAMBDA_FLUSH_TIMEOUT=10000
11
17
12
18
# java17 runtime puts the handler to run as a command line argument and seems to prefer
Original file line number Diff line number Diff line change 1
1
#! /bin/bash
2
2
3
+ set -ef -o pipefail
4
+
3
5
export OTEL_INSTRUMENTATION_AWS_LAMBDA_HANDLER=" $_HANDLER "
4
6
export _HANDLER=" io.opentelemetry.instrumentation.awslambdaevents.v2_2.TracingSqsEventWrapper"
5
7
6
8
if [[ $OTEL_RESOURCE_ATTRIBUTES != * " service.name=" * ]]; then
7
9
export OTEL_RESOURCE_ATTRIBUTES=" service.name=${AWS_LAMBDA_FUNCTION_NAME} ,${OTEL_RESOURCE_ATTRIBUTES} "
8
10
fi
9
11
12
+ if [[ -z " $OTEL_PROPAGATORS " ]]; then
13
+ export OTEL_PROPAGATORS=" tracecontext,baggage,xray"
14
+ fi
15
+
10
16
export OTEL_INSTRUMENTATION_AWS_LAMBDA_FLUSH_TIMEOUT=10000
11
17
12
18
# java17 runtime puts the handler to run as a command line argument and seems to prefer
Original file line number Diff line number Diff line change 1
1
#! /bin/bash
2
2
3
+ set -ef -o pipefail
4
+
3
5
export OTEL_INSTRUMENTATION_AWS_LAMBDA_HANDLER=" $_HANDLER "
4
6
export _HANDLER=" io.opentelemetry.instrumentation.awslambdacore.v1_0.TracingRequestStreamWrapper"
5
7
6
8
if [[ $OTEL_RESOURCE_ATTRIBUTES != * " service.name=" * ]]; then
7
9
export OTEL_RESOURCE_ATTRIBUTES=" service.name=${AWS_LAMBDA_FUNCTION_NAME} ,${OTEL_RESOURCE_ATTRIBUTES} "
8
10
fi
9
11
12
+ if [[ -z " $OTEL_PROPAGATORS " ]]; then
13
+ export OTEL_PROPAGATORS=" tracecontext,baggage,xray"
14
+ fi
15
+
10
16
export OTEL_INSTRUMENTATION_AWS_LAMBDA_FLUSH_TIMEOUT=10000
11
17
12
18
# java17 runtime puts the handler to run as a command line argument and seems to prefer
Original file line number Diff line number Diff line change 1
1
#! /bin/bash
2
2
3
+ set -ef -o pipefail
4
+
3
5
export NODE_OPTIONS=" ${NODE_OPTIONS} --require /opt/wrapper.js"
4
6
5
7
if [[ $OTEL_RESOURCE_ATTRIBUTES != * " service.name=" * ]]; then
6
8
export OTEL_RESOURCE_ATTRIBUTES=" service.name=${AWS_LAMBDA_FUNCTION_NAME} ,${OTEL_RESOURCE_ATTRIBUTES} "
7
9
fi
8
10
11
+ if [[ -z " $OTEL_PROPAGATORS " ]]; then
12
+ export OTEL_PROPAGATORS=" tracecontext,baggage,xray"
13
+ fi
14
+
9
15
exec " $@ "
Original file line number Diff line number Diff line change 1
1
#! /bin/bash
2
- set -e
2
+ set -euf -o pipefail
3
3
4
4
cp -r ../src/otel .
5
5
cp ../src/run.sh layer.sh
Original file line number Diff line number Diff line change 1
1
#! /bin/bash
2
2
3
+ set -ef -o pipefail
4
+
3
5
# Copyright The OpenTelemetry Authors
4
6
#
5
7
# Licensed under the Apache License, Version 2.0 (the "License");
@@ -98,6 +100,12 @@ if [ -z "${OTEL_SERVICE_NAME}" ]; then
98
100
export OTEL_SERVICE_NAME=$AWS_LAMBDA_FUNCTION_NAME ;
99
101
fi
100
102
103
+ # - Set the propagators
104
+
105
+ if [[ -z " $OTEL_PROPAGATORS " ]]; then
106
+ export OTEL_PROPAGATORS=" tracecontext,baggage,xray"
107
+ fi
108
+
101
109
# - Set the Resource Detectors (Resource Attributes)
102
110
#
103
111
# TODO: waiting on OTel Python support for configuring Resource Detectors from
Original file line number Diff line number Diff line change 1
1
#! /bin/bash
2
2
3
- set -e
4
- set -u
3
+ set -euf -o pipefail
5
4
6
5
echo_usage () {
7
6
echo " usage: Deploy Lambda layer/application by SAM"
You can’t perform that action at this time.
0 commit comments