Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
37 changes: 29 additions & 8 deletions instrument.sh
Original file line number Diff line number Diff line change
Expand Up @@ -227,13 +227,34 @@ if [ "$ENABLE_PROFILING" = "true" ]; then
export OTEL_AWS_APPLICATION_SIGNALS_RUNTIME_ENABLED="false";

else
export OTEL_EXPORTER_OTLP_PROTOCOL="http/protobuf"
export OTEL_EXPORTER_OTLP_ENDPOINT="http://127.0.0.1:4316"
export OTEL_AWS_APPLICATION_SIGNALS_EXPORTER_ENDPOINT="http://127.0.0.1:4316/v1/metrics"
export OTEL_METRICS_EXPORTER="none"
export OTEL_AWS_APPLICATION_SIGNALS_ENABLED="true"
export OTEL_TRACES_SAMPLER="xray"
export OTEL_TRACES_SAMPLER_ARG="endpoint=http://127.0.0.1:2000"
if [ -z "${OTEL_EXPORTER_OTLP_PROTOCOL}" ]; then
export OTEL_EXPORTER_OTLP_PROTOCOL="http/protobuf";
fi

if [ -z "${OTEL_EXPORTER_OTLP_ENDPOINT}" ]; then
export OTEL_EXPORTER_OTLP_ENDPOINT="http://127.0.0.1:4316";
fi

if [ -z "${OTEL_AWS_APPLICATION_SIGNALS_EXPORTER_ENDPOINT}" ]; then
export OTEL_AWS_APPLICATION_SIGNALS_EXPORTER_ENDPOINT="http://127.0.0.1:4316/v1/metrics";
fi

if [ -z "${OTEL_METRICS_EXPORTER}" ]; then
export OTEL_METRICS_EXPORTER="none";
fi

if [ -z "${OTEL_AWS_APPLICATION_SIGNALS_ENABLED}" ]; then
export OTEL_AWS_APPLICATION_SIGNALS_ENABLED="true";
fi

if [ -z "${OTEL_TRACES_SAMPLER}" ]; then
export OTEL_TRACES_SAMPLER="xray";
fi

if [ -z "${OTEL_TRACES_SAMPLER_ARG}" ]; then
export OTEL_TRACES_SAMPLER_ARG="endpoint=http://127.0.0.1:2000";
fi

fi

fi
Expand All @@ -244,4 +265,4 @@ if [ ! -z "${AWS_LAMBDA_FUNCTION_NAME}" ]; then
exec "${@//$OTEL_INSTRUMENTATION_AWS_LAMBDA_HANDLER/$_HANDLER}"
else
exec "$@"
fi
fi