Skip to content

Commit d83fdd0

Browse files
committed
updating patch for v1.33.6 + adding Fast Startup feature
1 parent dc6ba37 commit d83fdd0

File tree

4 files changed

+35
-8
lines changed

4 files changed

+35
-8
lines changed

lambda-layer/.gitignore

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,3 +3,9 @@
33

44
# Ignore Gradle build output directory
55
build
6+
7+
# Ignore Terraform state files
8+
.terraform
9+
*.tfstate
10+
*.tfstate.backup
11+
*.lock.hcl

lambda-layer/otel-instrument

Lines changed: 22 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,4 +35,25 @@ else
3535
export OTEL_RESOURCE_ATTRIBUTES="$LAMBDA_RESOURCE_ATTRIBUTES,$OTEL_RESOURCE_ATTRIBUTES";
3636
fi
3737

38-
exec "$@"
38+
ARGS=("$@")
39+
EXTRA_ARGS=()
40+
41+
if [ "${OTEL_JAVA_AGENT_FAST_STARTUP_ENABLED}" == "true" ]; then
42+
echo "[OTEL] Enabling fast startup mode ..."
43+
# Disable bytecode verification
44+
EXTRA_ARGS+=("-Xverify:none")
45+
# Be sure that tiered compilation is enabled
46+
EXTRA_ARGS+=("-XX:+TieredCompilation")
47+
# Stop tiered compilation at level 1
48+
EXTRA_ARGS+=("-XX:TieredStopAtLevel=1")
49+
for i in "${!ARGS[@]}"; do
50+
# If tiered compilation is disabled, ignore it as we enable it at level 1 for fast startup
51+
if [[ ${ARGS[i]} = "-XX:-TieredCompilation" ]]; then
52+
unset 'ARGS[i]'
53+
fi
54+
done
55+
fi
56+
57+
ARGS=("${ARGS[0]}" "${EXTRA_ARGS[@]}" "${ARGS[@]:1}")
58+
59+
exec "${ARGS[@]}"

lambda-layer/patches/aws-otel-java-instrumentation.patch

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@ index 9493189..6090207 100644
66
val TEST_SNAPSHOTS = rootProject.findProperty("testUpstreamSnapshots") == "true"
77

88
// This is the version of the upstream instrumentation BOM
9-
-val otelVersion = "1.32.1-adot2"
10-
+val otelVersion = "1.32.1-adot-lambda1"
11-
val otelSnapshotVersion = "1.33.0"
9+
-val otelVersion = "1.33.6-adot1"
10+
+val otelVersion = "1.33.6-adot-lambda1"
11+
val otelSnapshotVersion = "1.33.6"
1212
val otelAlphaVersion = if (!TEST_SNAPSHOTS) "$otelVersion-alpha" else "$otelSnapshotVersion-alpha-SNAPSHOT"
1313
val otelJavaAgentVersion = if (!TEST_SNAPSHOTS) otelVersion else "$otelSnapshotVersion-SNAPSHOT"

lambda-layer/patches/opentelemetry-java-instrumentation.patch

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -636,10 +636,10 @@ index cc1414c0bf..db8a59b046 100644
636636
--- a/version.gradle.kts
637637
+++ b/version.gradle.kts
638638
@@ -1,5 +1,5 @@
639-
-val stableVersion = "1.32.1"
640-
-val alphaVersion = "1.32.1-alpha"
641-
+val stableVersion = "1.32.1-adot-lambda1"
642-
+val alphaVersion = "1.32.1-adot-lambda1-alpha"
639+
-val stableVersion = "1.33.6"
640+
-val alphaVersion = "1.33.6-alpha"
641+
+val stableVersion = "1.33.6-adot-lambda1"
642+
+val alphaVersion = "1.33.6-adot-lambda1-alpha"
643643

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

0 commit comments

Comments
 (0)