From e5bc4f6f85c8894608fecc1dc8eef1b5cfa69caf Mon Sep 17 00:00:00 2001 From: Vasi Vasireddy <41936996+vasireddy99@users.noreply.github.com> Date: Thu, 1 Jun 2023 22:03:07 -0700 Subject: [PATCH] [chore] Update Python Dependencies and remove unsued scripts in the repo (#717) Fixes #643 Thi PR removes the integration test scripts in the repo, which are not used and have no purpose to sit in this repo, helps for the better maintainance of the project and Updates the Python dependencies. --- .github/workflows/pr-python.yml | 2 +- collector/Makefile | 4 +- go/integration-tests/aws-sdk/wrapper/main.tf | 21 ------- .../aws-sdk/wrapper/outputs.tf | 11 ---- .../aws-sdk/wrapper/variables.tf | 29 ---------- java/integration-tests/aws-sdk/agent/main.tf | 31 ---------- .../aws-sdk/agent/outputs.tf | 15 ----- .../aws-sdk/agent/variables.tf | 40 ------------- .../integration-tests/aws-sdk/wrapper/main.tf | 30 ---------- .../aws-sdk/wrapper/outputs.tf | 15 ----- .../aws-sdk/wrapper/variables.tf | 35 ------------ java/integration-tests/okhttp/wrapper/main.tf | 30 ---------- .../okhttp/wrapper/outputs.tf | 15 ----- .../okhttp/wrapper/variables.tf | 35 ------------ .../aws-sdk/wrapper/README.md | 10 ---- .../integration-tests/aws-sdk/wrapper/main.tf | 30 ---------- .../aws-sdk/wrapper/outputs.tf | 15 ----- .../aws-sdk/wrapper/variables.tf | 35 ------------ .../integration-tests/aws-sdk/wrapper/main.tf | 31 ---------- .../aws-sdk/wrapper/outputs.tf | 15 ----- .../aws-sdk/wrapper/variables.tf | 41 -------------- python/sample-apps/build.sh | 2 +- python/sample-apps/function/requirements.txt | 1 + .../src/otel/otel_sdk/requirements-nodeps.txt | 56 +++++++++---------- python/src/otel/otel_sdk/requirements.txt | 6 +- 25 files changed, 36 insertions(+), 519 deletions(-) delete mode 100644 go/integration-tests/aws-sdk/wrapper/main.tf delete mode 100644 go/integration-tests/aws-sdk/wrapper/outputs.tf delete mode 100644 go/integration-tests/aws-sdk/wrapper/variables.tf delete mode 100644 java/integration-tests/aws-sdk/agent/main.tf delete mode 100644 java/integration-tests/aws-sdk/agent/outputs.tf delete mode 100644 java/integration-tests/aws-sdk/agent/variables.tf delete mode 100644 java/integration-tests/aws-sdk/wrapper/main.tf delete mode 100644 java/integration-tests/aws-sdk/wrapper/outputs.tf delete mode 100644 java/integration-tests/aws-sdk/wrapper/variables.tf delete mode 100644 java/integration-tests/okhttp/wrapper/main.tf delete mode 100644 java/integration-tests/okhttp/wrapper/outputs.tf delete mode 100644 java/integration-tests/okhttp/wrapper/variables.tf delete mode 100644 nodejs/integration-tests/aws-sdk/wrapper/README.md delete mode 100644 nodejs/integration-tests/aws-sdk/wrapper/main.tf delete mode 100644 nodejs/integration-tests/aws-sdk/wrapper/outputs.tf delete mode 100644 nodejs/integration-tests/aws-sdk/wrapper/variables.tf delete mode 100644 python/integration-tests/aws-sdk/wrapper/main.tf delete mode 100644 python/integration-tests/aws-sdk/wrapper/outputs.tf delete mode 100644 python/integration-tests/aws-sdk/wrapper/variables.tf diff --git a/.github/workflows/pr-python.yml b/.github/workflows/pr-python.yml index 9bc55863ad..d31694f62d 100644 --- a/.github/workflows/pr-python.yml +++ b/.github/workflows/pr-python.yml @@ -11,7 +11,7 @@ env: AWS_REGION: us-east-1 # Copied this CORE_REPO_SHA from # https://github.com/open-telemetry/opentelemetry-python-contrib/blob/main/.github/workflows/test.yml#L9 - CORE_REPO_SHA: v1.17.0 + CORE_REPO_SHA: v1.18.0 jobs: PR-Python: diff --git a/collector/Makefile b/collector/Makefile index 8a3d5327bc..efce3b68ee 100644 --- a/collector/Makefile +++ b/collector/Makefile @@ -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 .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 @echo OpenTelemetry Collector layer published. .PHONY: gotidy diff --git a/go/integration-tests/aws-sdk/wrapper/main.tf b/go/integration-tests/aws-sdk/wrapper/main.tf deleted file mode 100644 index 6b20ab579a..0000000000 --- a/go/integration-tests/aws-sdk/wrapper/main.tf +++ /dev/null @@ -1,21 +0,0 @@ -resource "aws_lambda_layer_version" "collector_layer" { - count = var.enable_collector_layer ? 1 : 0 - layer_name = var.collector_layer_name - filename = "${path.module}/../../../../collector/build/collector-extension-amd64.zip" - compatible_runtimes = ["provided.al2"] - license_info = "Apache-2.0" - source_code_hash = filebase64sha256("${path.module}/../../../../collector/build/collector-extension-amd64.zip") -} - -module "hello-lambda-function" { - source = "../../../sample-apps/aws-sdk/deploy/wrapper" - name = var.function_name - architecture = var.architecture - collector_layer_arn = var.enable_collector_layer ? aws_lambda_layer_version.collector_layer[0].arn : null - tracing_mode = var.tracing_mode -} - -resource "aws_iam_role_policy_attachment" "hello-lambda-cloudwatch-insights" { - role = module.hello-lambda-function.function_role_name - policy_arn = "arn:aws:iam::aws:policy/service-role/AWSLambdaBasicExecutionRole" -} diff --git a/go/integration-tests/aws-sdk/wrapper/outputs.tf b/go/integration-tests/aws-sdk/wrapper/outputs.tf deleted file mode 100644 index 9ce1dce537..0000000000 --- a/go/integration-tests/aws-sdk/wrapper/outputs.tf +++ /dev/null @@ -1,11 +0,0 @@ -output "api-gateway-url" { - value = module.hello-lambda-function.api-gateway-url -} - -output "function_role_name" { - value = module.hello-lambda-function.function_role_name -} - -output "collector_layer_arn" { - value = var.enable_collector_layer ? aws_lambda_layer_version.collector_layer[0].arn : "" -} diff --git a/go/integration-tests/aws-sdk/wrapper/variables.tf b/go/integration-tests/aws-sdk/wrapper/variables.tf deleted file mode 100644 index 3335e1565f..0000000000 --- a/go/integration-tests/aws-sdk/wrapper/variables.tf +++ /dev/null @@ -1,29 +0,0 @@ -variable "collector_layer_name" { - type = string - description = "Name of published collector layer" - default = "opentelemetry-collector" -} - -variable "function_name" { - type = string - description = "Name of sample app function / API gateway" - default = "hello-go-awssdk-wrapper" -} - -variable "tracing_mode" { - type = string - description = "Lambda function tracing mode" - default = "PassThrough" -} - -variable "enable_collector_layer" { - type = bool - description = "Enables building and usage of a layer for the collector. If false, it means either the SDK layer includes the collector or it is not used." - default = true -} - -variable "architecture" { - type = string - description = "Lambda function architecture, valid values are arm64 or x86_64" - default = "x86_64" -} diff --git a/java/integration-tests/aws-sdk/agent/main.tf b/java/integration-tests/aws-sdk/agent/main.tf deleted file mode 100644 index 909279c2ed..0000000000 --- a/java/integration-tests/aws-sdk/agent/main.tf +++ /dev/null @@ -1,31 +0,0 @@ -resource "aws_lambda_layer_version" "sdk_layer" { - layer_name = var.sdk_layer_name - filename = "${path.module}/../../../layer-javaagent/build/distributions/opentelemetry-javaagent-layer.zip" - compatible_runtimes = ["java8", "java8.al2", "java11"] - license_info = "Apache-2.0" - source_code_hash = filebase64sha256("${path.module}/../../../layer-javaagent/build/distributions/opentelemetry-javaagent-layer.zip") -} - -resource "aws_lambda_layer_version" "collector_layer" { - count = var.enable_collector_layer ? 1 : 0 - layer_name = var.collector_layer_name - filename = "${path.module}/../../../../collector/build/collector-extension-amd64.zip" - compatible_runtimes = ["nodejs14.x", "nodejs16.x", "nodejs18.x"] - license_info = "Apache-2.0" - source_code_hash = filebase64sha256("${path.module}/../../../../collector/build/collector-extension-amd64.zip") -} - -module "hello-lambda-function" { - source = "../../../sample-apps/aws-sdk/deploy/agent" - name = var.function_name - architecture = var.architecture - collector_layer_arn = var.enable_collector_layer ? aws_lambda_layer_version.collector_layer[0].arn : null - sdk_layer_arn = aws_lambda_layer_version.sdk_layer.arn - collector_config_layer_arn = var.collector_config_layer_arn - tracing_mode = var.tracing_mode -} - -resource "aws_iam_role_policy_attachment" "hello-lambda-cloudwatch-insights" { - role = module.hello-lambda-function.function_role_name - policy_arn = "arn:aws:iam::aws:policy/service-role/AWSLambdaBasicExecutionRole" -} diff --git a/java/integration-tests/aws-sdk/agent/outputs.tf b/java/integration-tests/aws-sdk/agent/outputs.tf deleted file mode 100644 index a40152815b..0000000000 --- a/java/integration-tests/aws-sdk/agent/outputs.tf +++ /dev/null @@ -1,15 +0,0 @@ -output "api-gateway-url" { - value = module.hello-lambda-function.api-gateway-url -} - -output "function_role_name" { - value = module.hello-lambda-function.function_role_name -} - -output "collector_layer_arn" { - value = var.enable_collector_layer ? aws_lambda_layer_version.collector_layer[0].arn : "" -} - -output "sdk_layer_arn" { - value = aws_lambda_layer_version.sdk_layer.arn -} diff --git a/java/integration-tests/aws-sdk/agent/variables.tf b/java/integration-tests/aws-sdk/agent/variables.tf deleted file mode 100644 index b884f28e9c..0000000000 --- a/java/integration-tests/aws-sdk/agent/variables.tf +++ /dev/null @@ -1,40 +0,0 @@ -variable "collector_layer_name" { - type = string - description = "Name of published collector layer" - default = "opentelemetry-collector" -} - -variable "sdk_layer_name" { - type = string - description = "Name of published SDK layer" - default = "opentelemetry-java-agent" -} - -variable "collector_config_layer_arn" { - type = string - description = "Name for the Lambda layer containing the OpenTelemetry collector configuration file" -} - -variable "function_name" { - type = string - description = "Name of sample app function / API gateway" - default = "hello-java-awssdk-agent" -} - -variable "tracing_mode" { - type = string - description = "Lambda function tracing mode" - default = "PassThrough" -} - -variable "enable_collector_layer" { - type = bool - description = "Enables building and usage of a layer for the collector. If false, it means either the SDK layer includes the collector or it is not used." - default = true -} - -variable "architecture" { - type = string - description = "Lambda function architecture, valid values are arm64 or x86_64" - default = "x86_64" -} diff --git a/java/integration-tests/aws-sdk/wrapper/main.tf b/java/integration-tests/aws-sdk/wrapper/main.tf deleted file mode 100644 index d5a43ebc43..0000000000 --- a/java/integration-tests/aws-sdk/wrapper/main.tf +++ /dev/null @@ -1,30 +0,0 @@ -resource "aws_lambda_layer_version" "sdk_layer" { - layer_name = var.sdk_layer_name - filename = "${path.module}/../../../layer-wrapper/build/distributions/opentelemetry-java-wrapper.zip" - compatible_runtimes = ["java8", "java8.al2", "java11"] - license_info = "Apache-2.0" - source_code_hash = filebase64sha256("${path.module}/../../../layer-wrapper/build/distributions/opentelemetry-java-wrapper.zip") -} - -resource "aws_lambda_layer_version" "collector_layer" { - count = var.enable_collector_layer ? 1 : 0 - layer_name = var.collector_layer_name - filename = "${path.module}/../../../../collector/build/collector-extension-amd64.zip" - compatible_runtimes = ["nodejs14.x", "nodejs16.x", "nodejs18.x"] - license_info = "Apache-2.0" - source_code_hash = filebase64sha256("${path.module}/../../../../collector/build/collector-extension-amd64.zip") -} - -module "hello-lambda-function" { - source = "../../../sample-apps/aws-sdk/deploy/wrapper" - name = var.function_name - architecture = var.architecture - collector_layer_arn = var.enable_collector_layer ? aws_lambda_layer_version.collector_layer[0].arn : null - sdk_layer_arn = aws_lambda_layer_version.sdk_layer.arn - tracing_mode = var.tracing_mode -} - -resource "aws_iam_role_policy_attachment" "hello-lambda-cloudwatch-insights" { - role = module.hello-lambda-function.function_role_name - policy_arn = "arn:aws:iam::aws:policy/service-role/AWSLambdaBasicExecutionRole" -} diff --git a/java/integration-tests/aws-sdk/wrapper/outputs.tf b/java/integration-tests/aws-sdk/wrapper/outputs.tf deleted file mode 100644 index a40152815b..0000000000 --- a/java/integration-tests/aws-sdk/wrapper/outputs.tf +++ /dev/null @@ -1,15 +0,0 @@ -output "api-gateway-url" { - value = module.hello-lambda-function.api-gateway-url -} - -output "function_role_name" { - value = module.hello-lambda-function.function_role_name -} - -output "collector_layer_arn" { - value = var.enable_collector_layer ? aws_lambda_layer_version.collector_layer[0].arn : "" -} - -output "sdk_layer_arn" { - value = aws_lambda_layer_version.sdk_layer.arn -} diff --git a/java/integration-tests/aws-sdk/wrapper/variables.tf b/java/integration-tests/aws-sdk/wrapper/variables.tf deleted file mode 100644 index 1a048cd92b..0000000000 --- a/java/integration-tests/aws-sdk/wrapper/variables.tf +++ /dev/null @@ -1,35 +0,0 @@ -variable "collector_layer_name" { - type = string - description = "Name of published collector layer" - default = "opentelemetry-collector" -} - -variable "sdk_layer_name" { - type = string - description = "Name of published SDK layer" - default = "opentelemetry-java-wrapper" -} - -variable "function_name" { - type = string - description = "Name of sample app function / API gateway" - default = "hello-java-awssdk-wrapper" -} - -variable "tracing_mode" { - type = string - description = "Lambda function tracing mode" - default = "PassThrough" -} - -variable "enable_collector_layer" { - type = bool - description = "Enables building and usage of a layer for the collector. If false, it means either the SDK layer includes the collector or it is not used." - default = true -} - -variable "architecture" { - type = string - description = "Lambda function architecture, valid values are arm64 or x86_64" - default = "x86_64" -} diff --git a/java/integration-tests/okhttp/wrapper/main.tf b/java/integration-tests/okhttp/wrapper/main.tf deleted file mode 100644 index 6aec37db1a..0000000000 --- a/java/integration-tests/okhttp/wrapper/main.tf +++ /dev/null @@ -1,30 +0,0 @@ -resource "aws_lambda_layer_version" "sdk_layer" { - layer_name = var.sdk_layer_name - filename = "${path.module}/../../../layer-wrapper/build/distributions/opentelemetry-java-wrapper.zip" - compatible_runtimes = ["java8", "java8.al2", "java11"] - license_info = "Apache-2.0" - source_code_hash = filebase64sha256("${path.module}/../../../layer-wrapper/build/distributions/opentelemetry-java-wrapper.zip") -} - -resource "aws_lambda_layer_version" "collector_layer" { - count = var.enable_collector_layer ? 1 : 0 - layer_name = var.collector_layer_name - filename = "${path.module}/../../../../collector/build/collector-extension-amd64.zip" - compatible_runtimes = ["nodejs14.x", "nodejs16.x", "nodejs18.x"] - license_info = "Apache-2.0" - source_code_hash = filebase64sha256("${path.module}/../../../../collector/build/collector-extension-amd64.zip") -} - -module "hello-lambda-function" { - source = "../../../sample-apps/okhttp/deploy/wrapper" - name = var.function_name - architecture = var.architecture - collector_layer_arn = var.enable_collector_layer ? aws_lambda_layer_version.collector_layer[0].arn : null - sdk_layer_arn = aws_lambda_layer_version.sdk_layer.arn - tracing_mode = var.tracing_mode -} - -resource "aws_iam_role_policy_attachment" "hello-lambda-cloudwatch-insights" { - role = module.hello-lambda-function.function_role_name - policy_arn = "arn:aws:iam::aws:policy/service-role/AWSLambdaBasicExecutionRole" -} diff --git a/java/integration-tests/okhttp/wrapper/outputs.tf b/java/integration-tests/okhttp/wrapper/outputs.tf deleted file mode 100644 index a40152815b..0000000000 --- a/java/integration-tests/okhttp/wrapper/outputs.tf +++ /dev/null @@ -1,15 +0,0 @@ -output "api-gateway-url" { - value = module.hello-lambda-function.api-gateway-url -} - -output "function_role_name" { - value = module.hello-lambda-function.function_role_name -} - -output "collector_layer_arn" { - value = var.enable_collector_layer ? aws_lambda_layer_version.collector_layer[0].arn : "" -} - -output "sdk_layer_arn" { - value = aws_lambda_layer_version.sdk_layer.arn -} diff --git a/java/integration-tests/okhttp/wrapper/variables.tf b/java/integration-tests/okhttp/wrapper/variables.tf deleted file mode 100644 index 90cb426b65..0000000000 --- a/java/integration-tests/okhttp/wrapper/variables.tf +++ /dev/null @@ -1,35 +0,0 @@ -variable "collector_layer_name" { - type = string - description = "Name of published collector layer" - default = "opentelemetry-collector" -} - -variable "sdk_layer_name" { - type = string - description = "Name of published SDK layer" - default = "opentelemetry-java-wrapper" -} - -variable "function_name" { - type = string - description = "Name of sample app function / API gateway" - default = "hello-java-okhttp-wrapper" -} - -variable "tracing_mode" { - type = string - description = "Lambda function tracing mode" - default = "PassThrough" -} - -variable "enable_collector_layer" { - type = bool - description = "Enables building and usage of a layer for the collector. If false, it means either the SDK layer includes the collector or it is not used." - default = true -} - -variable "architecture" { - type = string - description = "Lambda function architecture, valid values are arm64 or x86_64" - default = "x86_64" -} diff --git a/nodejs/integration-tests/aws-sdk/wrapper/README.md b/nodejs/integration-tests/aws-sdk/wrapper/README.md deleted file mode 100644 index 16d7479193..0000000000 --- a/nodejs/integration-tests/aws-sdk/wrapper/README.md +++ /dev/null @@ -1,10 +0,0 @@ -# Building the Node.js Public Layer from Source - -This sample application is the same as the [public layer sample app](../../../sample-apps/aws-sdk) except it builds the Node.js SDK and Collector layers from source. To deploy this sample app, simply run: - -``` -terraform init -terraform apply -``` - -Then visit the API GateWay endpoint that's generated. diff --git a/nodejs/integration-tests/aws-sdk/wrapper/main.tf b/nodejs/integration-tests/aws-sdk/wrapper/main.tf deleted file mode 100644 index afc4d7c191..0000000000 --- a/nodejs/integration-tests/aws-sdk/wrapper/main.tf +++ /dev/null @@ -1,30 +0,0 @@ -resource "aws_lambda_layer_version" "sdk_layer" { - layer_name = var.sdk_layer_name - filename = "${path.module}/../../../packages/layer/build/layer.zip" - compatible_runtimes = ["nodejs14.x", "nodejs16.x", "nodejs18.x"] - license_info = "Apache-2.0" - source_code_hash = filebase64sha256("${path.module}/../../../packages/layer/build/layer.zip") -} - -resource "aws_lambda_layer_version" "collector_layer" { - count = var.enable_collector_layer ? 1 : 0 - layer_name = var.collector_layer_name - filename = "${path.module}/../../../../collector/build/collector-extension-amd64.zip" - compatible_runtimes = ["nodejs14.x", "nodejs16.x", "nodejs18.x"] - license_info = "Apache-2.0" - source_code_hash = filebase64sha256("${path.module}/../../../../collector/build/collector-extension-amd64.zip") -} - -module "hello-lambda-function" { - source = "../../../sample-apps/aws-sdk/deploy/wrapper" - name = var.function_name - architecture = var.architecture - collector_layer_arn = var.enable_collector_layer ? aws_lambda_layer_version.collector_layer[0].arn : null - sdk_layer_arn = aws_lambda_layer_version.sdk_layer.arn - tracing_mode = var.tracing_mode -} - -resource "aws_iam_role_policy_attachment" "hello-lambda-cloudwatch-insights" { - role = module.hello-lambda-function.function_role_name - policy_arn = "arn:aws:iam::aws:policy/service-role/AWSLambdaBasicExecutionRole" -} diff --git a/nodejs/integration-tests/aws-sdk/wrapper/outputs.tf b/nodejs/integration-tests/aws-sdk/wrapper/outputs.tf deleted file mode 100644 index a40152815b..0000000000 --- a/nodejs/integration-tests/aws-sdk/wrapper/outputs.tf +++ /dev/null @@ -1,15 +0,0 @@ -output "api-gateway-url" { - value = module.hello-lambda-function.api-gateway-url -} - -output "function_role_name" { - value = module.hello-lambda-function.function_role_name -} - -output "collector_layer_arn" { - value = var.enable_collector_layer ? aws_lambda_layer_version.collector_layer[0].arn : "" -} - -output "sdk_layer_arn" { - value = aws_lambda_layer_version.sdk_layer.arn -} diff --git a/nodejs/integration-tests/aws-sdk/wrapper/variables.tf b/nodejs/integration-tests/aws-sdk/wrapper/variables.tf deleted file mode 100644 index ca56fd4ba4..0000000000 --- a/nodejs/integration-tests/aws-sdk/wrapper/variables.tf +++ /dev/null @@ -1,35 +0,0 @@ -variable "collector_layer_name" { - type = string - description = "Name of published collector layer" - default = "opentelemetry-collector" -} - -variable "sdk_layer_name" { - type = string - description = "Name of published SDK layer" - default = "opentelemetry-nodejs-wrapper" -} - -variable "function_name" { - type = string - description = "Name of sample app function / API gateway" - default = "hello-nodejs-awssdk" -} - -variable "tracing_mode" { - type = string - description = "Lambda function tracing mode" - default = "PassThrough" -} - -variable "enable_collector_layer" { - type = bool - description = "Enables building and usage of a layer for the collector. If false, it means either the SDK layer includes the collector or it is not used." - default = true -} - -variable "architecture" { - type = string - description = "Lambda function architecture, valid values are arm64 or x86_64" - default = "x86_64" -} diff --git a/python/integration-tests/aws-sdk/wrapper/main.tf b/python/integration-tests/aws-sdk/wrapper/main.tf deleted file mode 100644 index 27d768f9e0..0000000000 --- a/python/integration-tests/aws-sdk/wrapper/main.tf +++ /dev/null @@ -1,31 +0,0 @@ -resource "aws_lambda_layer_version" "sdk_layer" { - layer_name = var.sdk_layer_name - filename = "${path.module}/../../../src/build/layer.zip" - compatible_runtimes = ["python3.8", "python3.9"] - license_info = "Apache-2.0" - source_code_hash = filebase64sha256("${path.module}/../../../src/build/layer.zip") -} - -resource "aws_lambda_layer_version" "collector_layer" { - count = var.enable_collector_layer ? 1 : 0 - layer_name = var.collector_layer_name - filename = "${path.module}/../../../../collector/build/collector-extension-amd64.zip" - compatible_runtimes = ["nodejs14.x", "nodejs16.x", "nodejs18.x"] - license_info = "Apache-2.0" - source_code_hash = filebase64sha256("${path.module}/../../../../collector/build/collector-extension-amd64.zip") -} - -module "hello-lambda-function" { - source = "../../../sample-apps/aws-sdk/deploy/wrapper" - name = var.function_name - architecture = var.architecture - collector_layer_arn = var.enable_collector_layer ? aws_lambda_layer_version.collector_layer[0].arn : null - sdk_layer_arn = aws_lambda_layer_version.sdk_layer.arn - tracing_mode = var.tracing_mode - runtime = var.runtime -} - -resource "aws_iam_role_policy_attachment" "hello-lambda-cloudwatch-insights" { - role = module.hello-lambda-function.function_role_name - policy_arn = "arn:aws:iam::aws:policy/service-role/AWSLambdaBasicExecutionRole" -} diff --git a/python/integration-tests/aws-sdk/wrapper/outputs.tf b/python/integration-tests/aws-sdk/wrapper/outputs.tf deleted file mode 100644 index a40152815b..0000000000 --- a/python/integration-tests/aws-sdk/wrapper/outputs.tf +++ /dev/null @@ -1,15 +0,0 @@ -output "api-gateway-url" { - value = module.hello-lambda-function.api-gateway-url -} - -output "function_role_name" { - value = module.hello-lambda-function.function_role_name -} - -output "collector_layer_arn" { - value = var.enable_collector_layer ? aws_lambda_layer_version.collector_layer[0].arn : "" -} - -output "sdk_layer_arn" { - value = aws_lambda_layer_version.sdk_layer.arn -} diff --git a/python/integration-tests/aws-sdk/wrapper/variables.tf b/python/integration-tests/aws-sdk/wrapper/variables.tf deleted file mode 100644 index 5c8f1ded10..0000000000 --- a/python/integration-tests/aws-sdk/wrapper/variables.tf +++ /dev/null @@ -1,41 +0,0 @@ -variable "collector_layer_name" { - type = string - description = "Name of published collector layer" - default = "opentelemetry-collector" -} - -variable "sdk_layer_name" { - type = string - description = "Name of published SDK layer" - default = "opentelemetry-java-wrapper" -} - -variable "function_name" { - type = string - description = "Name of sample app function / API gateway" - default = "hello-python" -} - -variable "tracing_mode" { - type = string - description = "Lambda function tracing mode" - default = "PassThrough" -} - -variable "enable_collector_layer" { - type = bool - description = "Enables building and usage of a layer for the collector. If false, it means either the SDK layer includes the collector or it is not used." - default = true -} - -variable "architecture" { - type = string - description = "Lambda function architecture, valid values are arm64 or x86_64" - default = "x86_64" -} - -variable "runtime" { - type = string - description = "Python runtime version used for sample Lambda Function" - default = "python3.9" -} diff --git a/python/sample-apps/build.sh b/python/sample-apps/build.sh index 564adadb12..e2be3fe07e 100755 --- a/python/sample-apps/build.sh +++ b/python/sample-apps/build.sh @@ -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 ./* diff --git a/python/sample-apps/function/requirements.txt b/python/sample-apps/function/requirements.txt index f2293605cf..cdb77fdfde 100644 --- a/python/sample-apps/function/requirements.txt +++ b/python/sample-apps/function/requirements.txt @@ -1 +1,2 @@ requests +boto3 \ No newline at end of file diff --git a/python/src/otel/otel_sdk/requirements-nodeps.txt b/python/src/otel/otel_sdk/requirements-nodeps.txt index 3db0af2694..391c6d107d 100644 --- a/python/src/otel/otel_sdk/requirements-nodeps.txt +++ b/python/src/otel/otel_sdk/requirements-nodeps.txt @@ -1,30 +1,30 @@ -opentelemetry-instrumentation-aiohttp-client==0.38b0 -opentelemetry-util-http==0.38b0 +opentelemetry-instrumentation-aiohttp-client==0.39b0 +opentelemetry-util-http==0.39b0 asgiref~=3.6 -opentelemetry-instrumentation-asgi==0.38b0 -opentelemetry-instrumentation-asyncpg==0.38b0 -opentelemetry-instrumentation-boto==0.38b0 -opentelemetry-instrumentation-botocore==0.38b0 -opentelemetry-instrumentation-celery==0.38b0 -opentelemetry-instrumentation-dbapi==0.38b0 -opentelemetry-instrumentation-django==0.38b0 -opentelemetry-instrumentation-elasticsearch==0.38b0 -opentelemetry-instrumentation-fastapi==0.38b0 -opentelemetry-instrumentation-falcon==0.38b0 -opentelemetry-instrumentation-flask==0.38b0 -opentelemetry-instrumentation-grpc==0.38b0 -opentelemetry-instrumentation-jinja2==0.38b0 -opentelemetry-instrumentation-mysql==0.38b0 -opentelemetry-instrumentation-psycopg2==0.38b0 -opentelemetry-instrumentation-pymemcache==0.38b0 -opentelemetry-instrumentation-pymongo==0.38b0 -opentelemetry-instrumentation-pymysql==0.38b0 -opentelemetry-instrumentation-pyramid==0.38b0 -opentelemetry-instrumentation-redis==0.38b0 -opentelemetry-instrumentation-requests==0.38b0 -opentelemetry-instrumentation-sqlalchemy==0.38b0 -opentelemetry-instrumentation-sqlite3==0.38b0 -opentelemetry-instrumentation-starlette==0.38b0 -opentelemetry-instrumentation-tornado==0.38b0 -opentelemetry-instrumentation-wsgi==0.38b0 +opentelemetry-instrumentation-asgi==0.39b0 +opentelemetry-instrumentation-asyncpg==0.39b0 +opentelemetry-instrumentation-boto==0.39b0 +opentelemetry-instrumentation-botocore==0.39b0 +opentelemetry-instrumentation-celery==0.39b0 +opentelemetry-instrumentation-dbapi==0.39b0 +opentelemetry-instrumentation-django==0.39b0 +opentelemetry-instrumentation-elasticsearch==0.39b0 +opentelemetry-instrumentation-fastapi==0.39b0 +opentelemetry-instrumentation-falcon==0.39b0 +opentelemetry-instrumentation-flask==0.39b0 +opentelemetry-instrumentation-grpc==0.39b0 +opentelemetry-instrumentation-jinja2==0.39b0 +opentelemetry-instrumentation-mysql==0.39b0 +opentelemetry-instrumentation-psycopg2==0.39b0 +opentelemetry-instrumentation-pymemcache==0.39b0 +opentelemetry-instrumentation-pymongo==0.39b0 +opentelemetry-instrumentation-pymysql==0.39b0 +opentelemetry-instrumentation-pyramid==0.39b0 +opentelemetry-instrumentation-redis==0.39b0 +opentelemetry-instrumentation-requests==0.39b0 +opentelemetry-instrumentation-sqlalchemy==0.39b0 +opentelemetry-instrumentation-sqlite3==0.39b0 +opentelemetry-instrumentation-starlette==0.39b0 +opentelemetry-instrumentation-tornado==0.39b0 +opentelemetry-instrumentation-wsgi==0.39b0 diff --git a/python/src/otel/otel_sdk/requirements.txt b/python/src/otel/otel_sdk/requirements.txt index 4701fc776c..436f647a53 100644 --- a/python/src/otel/otel_sdk/requirements.txt +++ b/python/src/otel/otel_sdk/requirements.txt @@ -1,3 +1,3 @@ -opentelemetry-exporter-otlp-proto-http==1.17.0 -opentelemetry-distro==0.38b0 -opentelemetry-instrumentation-aws-lambda==0.38b0 +opentelemetry-exporter-otlp-proto-http==1.18.0 +opentelemetry-distro==0.39b0 +opentelemetry-instrumentation-aws-lambda==0.39b0