Skip to content
Closed
Show file tree
Hide file tree
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
4 changes: 2 additions & 2 deletions collector/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -48,12 +48,12 @@ package: build

.PHONY: publish
publish:
aws lambda publish-layer-version --layer-name $(LAYER_NAME) --zip-file fileb://$(BUILD_SPACE)/collector-extension-$(GOARCH).zip --compatible-runtimes nodejs14.x nodejs16.x nodejs18.x java11 python3.8 python3.9 --query 'LayerVersionArn' --output text
aws lambda publish-layer-version --layer-name $(LAYER_NAME) --zip-file fileb://$(BUILD_SPACE)/opentelemetry-collector-layer-$(GOARCH).zip --compatible-runtimes nodejs14.x nodejs16.x nodejs18.x java11 python3.8 python3.9 --query 'LayerVersionArn' --output text
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I see that the name for the file produced in the .PHONY: package is opentelemetry-collector-layer-$(GOARCH).zip. Is this fixing an issue where the .PHONY: publish action was failing because it couldn't find the file to publish? 🤔

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes That is correct and it will publish now with this change, it wasn't able to find the file since it was renamed.


.PHONY: publish-layer
publish-layer: package
@echo Publishing collector extension layer...
aws lambda publish-layer-version --layer-name $(LAYER_NAME) --zip-file fileb://$(BUILD_SPACE)/collector-extension-$(GOARCH).zip --compatible-runtimes nodejs14.x nodejs16.x nodejs18.x java11 python3.8 python3.9 --query 'LayerVersionArn' --output text
aws lambda publish-layer-version --layer-name $(LAYER_NAME) --zip-file fileb://$(BUILD_SPACE)/opentelemetry-collector-layer-$(GOARCH).zip --compatible-runtimes nodejs14.x nodejs16.x nodejs18.x java11 python3.8 python3.9 --query 'LayerVersionArn' --output text
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I found collector-extension-$(GOARCH).zip elsewhere in this repo:

tigre@hilleman:~/github/ocelotl/opentelemetry-lambda$ ack collector-extension
go/integration-tests/aws-sdk/wrapper/main.tf
4:  filename            = "${path.module}/../../../../collector/build/collector-extension-amd64.zip"
7:  source_code_hash    = filebase64sha256("${path.module}/../../../../collector/build/collector-extension-amd64.zip")

python/integration-tests/aws-sdk/wrapper/main.tf
12:  filename            = "${path.module}/../../../../collector/build/collector-extension-amd64.zip"
15:  source_code_hash    = filebase64sha256("${path.module}/../../../../collector/build/collector-extension-amd64.zip")

nodejs/integration-tests/aws-sdk/wrapper/main.tf
12:  filename            = "${path.module}/../../../../collector/build/collector-extension-amd64.zip"
15:  source_code_hash    = filebase64sha256("${path.module}/../../../../collector/build/collector-extension-amd64.zip")

collector/Makefile
51:     aws lambda publish-layer-version --layer-name $(LAYER_NAME) --zip-file fileb://$(BUILD_SPACE)/collector-extension-$(GOARCH).zip --compatible-runtimes nodejs14.x nodejs16.x nodejs18.x java11 python3.8 python3.9 --query 'LayerVersionArn' --output text
56:     aws lambda publish-layer-version --layer-name $(LAYER_NAME) --zip-file fileb://$(BUILD_SPACE)/collector-extension-$(GOARCH).zip --compatible-runtimes nodejs14.x nodejs16.x nodejs18.x java11 python3.8 python3.9 --query 'LayerVersionArn' --output text

java/integration-tests/okhttp/wrapper/main.tf
12:  filename            = "${path.module}/../../../../collector/build/collector-extension-amd64.zip"
15:  source_code_hash    = filebase64sha256("${path.module}/../../../../collector/build/collector-extension-amd64.zip")

java/integration-tests/aws-sdk/wrapper/main.tf
12:  filename            = "${path.module}/../../../../collector/build/collector-extension-amd64.zip"
15:  source_code_hash    = filebase64sha256("${path.module}/../../../../collector/build/collector-extension-amd64.zip")

java/integration-tests/aws-sdk/agent/main.tf
12:  filename            = "${path.module}/../../../../collector/build/collector-extension-amd64.zip"
15:  source_code_hash    = filebase64sha256("${path.module}/../../../../collector/build/collector-extension-amd64.zip")

dotnet/integration-tests/aws-sdk/wrapper/main.tf
4:  filename            = "${path.module}/../../../../collector/build/collector-extension-amd64.zip"
7:  source_code_hash    = filebase64sha256("${path.module}/../../../../collector/build/collector-extension-amd64.zip")

utils/sam/run.sh
95:             rm -f build/collector-extension-amd64.zip

do we need to also change those other occurrences?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The rest of the occurrences in the .tf files are invalid for use in this repo. I am going to PR soon to remove those unused files in this repo.

@echo OpenTelemetry Collector layer published.

.PHONY: gotidy
Expand Down
2 changes: 1 addition & 1 deletion python/sample-apps/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,6 @@ set -e

mkdir -p build/python
python3 -m pip install -r function/requirements.txt -t build/python
cp function/lambda_function.py -t build/python
cp function/lambda_function.py build/python
cd build/python
zip -r ../function.zip ./*
1 change: 1 addition & 0 deletions python/sample-apps/function/requirements.txt
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
requests
boto3
2 changes: 1 addition & 1 deletion utils/sam/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ main() {
echo "run.sh: building the collector..."
pushd "$collectorPath"
make package
rm -f build/collector-extension-amd64.zip
rm -f build/opentelemetry-collector-layer-amd64.zip
popd
rm -rf otel/collector_build/
cp -r "$collectorPath"/build/ otel/collector_build/
Expand Down