Skip to content

Commit 62b1f1b

Browse files
authored
Add aws.pulse.over.midlina attribute for lambda spans (#77)
*Description of changes:* Add `aws.pulse.over.midlina` for lambda spans when AppSignals is enabled, so server side can use it to determine whether it should generate EMF metrics ``` 2024-09-27T15:19:32.789-07:00 | 'faas.name': 'aws-opentelemetry-distro-nodejs', | 2024/09/27/[$LATEST]af2cea6e28a94c24aa098ed39567d85b -- | -- | --   | 2024-09-27T15:19:32.789-07:00 | 'faas.version': '$LATEST', | 2024/09/27/[$LATEST]af2cea6e28a94c24aa098ed39567d85b   | 2024-09-27T15:19:32.789-07:00 | 'faas.instance': '2024/09/27/[$LATEST]af2cea6e28a94c24aa098ed39567d85b', | 2024/09/27/[$LATEST]af2cea6e28a94c24aa098ed39567d85b   | 2024-09-27T15:19:32.789-07:00 | 'aws.log.group.names': '/aws/lambda/aws-opentelemetry-distro-nodejs', | 2024/09/27/[$LATEST]af2cea6e28a94c24aa098ed39567d85b   | 2024-09-27T15:19:32.789-07:00 | 'aws.pulse.over.midlina': 'true' ``` 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 4cdc78f commit 62b1f1b

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

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

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,10 @@ if [ -z "${OTEL_AWS_APPLICATION_SIGNALS_ENABLED}" ]; then
2828
export OTEL_AWS_APPLICATION_SIGNALS_ENABLED="true";
2929
fi
3030

31+
if [ "${OTEL_AWS_APPLICATION_SIGNALS_ENABLED}" = "true" ]; then
32+
export LAMBDA_RESOURCE_ATTRIBUTES="aws.pulse.over.midlina=true,${LAMBDA_RESOURCE_ATTRIBUTES}"
33+
fi
34+
3135
if [ -z "${OTEL_METRICS_EXPORTER}" ]; then
3236
export OTEL_METRICS_EXPORTER="none";
3337
fi

0 commit comments

Comments
 (0)