Skip to content

Commit

Permalink
use npm run build to build layer, fix lambda java patch
Browse files Browse the repository at this point in the history
  • Loading branch information
vasireddy99 committed Dec 27, 2024
1 parent 92aa249 commit dfd95af
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 9 deletions.
6 changes: 3 additions & 3 deletions java/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -65,12 +65,12 @@ popd || exit

# Combine Java Wrapper build and ADOT Collector
pushd ./layer-wrapper/build/distributions || exit
unzip -qo opentelemetry-java-wrapper.zip
rm opentelemetry-java-wrapper.zip
unzip -qo opentelemetry-javawrapper-layer.zip
rm opentelemetry-javawrapper-layer.zip
mv otel-handler otel-handler-upstream
mv otel-stream-handler otel-stream-handler-upstream
mv otel-proxy-handler otel-proxy-handler-upstream
cp "$SOURCEDIR"/scripts/* .
unzip -qo ${SOURCEDIR}/../opentelemetry-lambda/collector/build/opentelemetry-collector-layer-$1.zip
zip -qr opentelemetry-java-wrapper.zip *
zip -qr opentelemetry-javawrapper-layer.zip *
popd || exit
4 changes: 2 additions & 2 deletions java/integration-tests/aws-sdk/wrapper/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@ locals {

resource "aws_lambda_layer_version" "sdk_layer" {
layer_name = var.sdk_layer_name
filename = "${path.module}/../../../../opentelemetry-lambda/java/layer-wrapper/build/distributions/opentelemetry-java-wrapper.zip"
filename = "${path.module}/../../../../opentelemetry-lambda/java/layer-wrapper/build/distributions/opentelemetry-javawrapper-layer.zip"
compatible_runtimes = ["java8.al2", "java11", "java17"]
license_info = "Apache-2.0"
source_code_hash = filebase64sha256("${path.module}/../../../../opentelemetry-lambda/java/layer-wrapper/build/distributions/opentelemetry-java-wrapper.zip")
source_code_hash = filebase64sha256("${path.module}/../../../../opentelemetry-lambda/java/layer-wrapper/build/distributions/opentelemetry-javawrapper-layer.zip")
}

resource "aws_lambda_layer_version" "collector_layer" {
Expand Down
4 changes: 2 additions & 2 deletions java/integration-tests/okhttp/wrapper/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@ locals {

resource "aws_lambda_layer_version" "sdk_layer" {
layer_name = var.sdk_layer_name
filename = "${path.module}/../../../../opentelemetry-lambda/java/layer-wrapper/build/distributions/opentelemetry-java-wrapper.zip"
filename = "${path.module}/../../../../opentelemetry-lambda/java/layer-wrapper/build/distributions/opentelemetry-javawrapper-layer.zip"
compatible_runtimes = ["java8.al2", "java11", "java17"]
license_info = "Apache-2.0"
source_code_hash = filebase64sha256("${path.module}/../../../../opentelemetry-lambda/java/layer-wrapper/build/distributions/opentelemetry-java-wrapper.zip")
source_code_hash = filebase64sha256("${path.module}/../../../../opentelemetry-lambda/java/layer-wrapper/build/distributions/opentelemetry-javawrapper-layer.zip")
}

resource "aws_lambda_layer_version" "collector_layer" {
Expand Down
2 changes: 1 addition & 1 deletion nodejs/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ cd wrapper-adot || exit
npm install || exit

cd ../../opentelemetry-lambda/nodejs || exit
npm install || exit
npm install && npm run build|| exit

mv ./packages/layer/build/workspace/otel-handler ./packages/layer/build/workspace/otel-handler-upstream
cp "$SOURCEDIR"/scripts/otel-handler ./packages/layer/build/workspace/otel-handler
Expand Down
2 changes: 1 addition & 1 deletion patches/opentelemetry-lambda_java.patch
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ index 7693c66..e66bcba 100644
spotless {
java {
- googleJavaFormat()
+ googleJavaFormat("1.15.0"))
+ googleJavaFormat("1.15.0")
}
}

Expand Down

0 comments on commit dfd95af

Please sign in to comment.