Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
6 changes: 6 additions & 0 deletions lambda-layer/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,9 @@

# Ignore Gradle build output directory
build

# Ignore Terraform state files
.terraform
*.tfstate
*.tfstate.backup
*.lock.hcl
23 changes: 22 additions & 1 deletion lambda-layer/otel-instrument
Original file line number Diff line number Diff line change
Expand Up @@ -35,4 +35,25 @@ else
export OTEL_RESOURCE_ATTRIBUTES="$LAMBDA_RESOURCE_ATTRIBUTES,$OTEL_RESOURCE_ATTRIBUTES";
fi

exec "$@"
ARGS=("$@")
EXTRA_ARGS=()

if [ "${OTEL_JAVA_AGENT_FAST_STARTUP_ENABLED}" == "true" ]; then
echo "[OTEL] Enabling fast startup mode ..."
# Disable bytecode verification
EXTRA_ARGS+=("-Xverify:none")
# Be sure that tiered compilation is enabled
EXTRA_ARGS+=("-XX:+TieredCompilation")
# Stop tiered compilation at level 1
EXTRA_ARGS+=("-XX:TieredStopAtLevel=1")
for i in "${!ARGS[@]}"; do
# If tiered compilation is disabled, ignore it as we enable it at level 1 for fast startup
if [[ ${ARGS[i]} = "-XX:-TieredCompilation" ]]; then
unset 'ARGS[i]'
fi
done
fi

ARGS=("${ARGS[0]}" "${EXTRA_ARGS[@]}" "${ARGS[@]:1}")

exec "${ARGS[@]}"
6 changes: 3 additions & 3 deletions lambda-layer/patches/aws-otel-java-instrumentation.patch
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ index 9493189..6090207 100644
val TEST_SNAPSHOTS = rootProject.findProperty("testUpstreamSnapshots") == "true"

// This is the version of the upstream instrumentation BOM
-val otelVersion = "1.32.1-adot2"
+val otelVersion = "1.32.1-adot-lambda1"
val otelSnapshotVersion = "1.33.0"
-val otelVersion = "1.33.6-adot1"
+val otelVersion = "1.33.6-adot-lambda1"
val otelSnapshotVersion = "1.33.6"
val otelAlphaVersion = if (!TEST_SNAPSHOTS) "$otelVersion-alpha" else "$otelSnapshotVersion-alpha-SNAPSHOT"
val otelJavaAgentVersion = if (!TEST_SNAPSHOTS) otelVersion else "$otelSnapshotVersion-SNAPSHOT"
Original file line number Diff line number Diff line change
Expand Up @@ -636,10 +636,10 @@ index cc1414c0bf..db8a59b046 100644
--- a/version.gradle.kts
+++ b/version.gradle.kts
@@ -1,5 +1,5 @@
-val stableVersion = "1.32.1"
-val alphaVersion = "1.32.1-alpha"
+val stableVersion = "1.32.1-adot-lambda1"
+val alphaVersion = "1.32.1-adot-lambda1-alpha"
-val stableVersion = "1.33.6"
-val alphaVersion = "1.33.6-alpha"
+val stableVersion = "1.33.6-adot-lambda1"
+val alphaVersion = "1.33.6-adot-lambda1-alpha"

allprojects {
if (findProperty("otel.stable") != "true") {
Loading