Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[chore] Fix workflows with breaking changes and Set/modify otel propagators in the build scripts #1024

Merged
merged 5 commits into from
Jan 2, 2025
Merged
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
1 change: 1 addition & 0 deletions go/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,5 @@ popd || exit
# Build sample app

cd ../opentelemetry-lambda/go/sample-apps/function || exit
go mod tidy
Copy link
Member

Choose a reason for hiding this comment

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

This should not be necessary. The repo shouldn't ever be left in a state where the go.mod file is inconsistent.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

i agree, created the PR, i will remove this line once the upstream pr is merged.

CGO_ENABLED=0 ./build.sh
6 changes: 3 additions & 3 deletions java/integration-tests/aws-sdk/agent-confmap/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ resource "aws_lambda_layer_version" "collector_layer" {
count = var.enable_collector_layer ? 1 : 0
layer_name = var.collector_layer_name
filename = "${path.module}/../../../../opentelemetry-lambda/collector/build/opentelemetry-collector-layer-${local.architecture}.zip"
compatible_runtimes = ["nodejs14.x", "nodejs16.x", "nodejs18.x"]
compatible_runtimes = ["nodejs16.x", "nodejs18.x", "nodejs20.x", "nodejs22.x"]
license_info = "Apache-2.0"
source_code_hash = filebase64sha256("${path.module}/../../../../opentelemetry-lambda/collector/build/opentelemetry-collector-layer-${local.architecture}.zip")
}
Expand Down Expand Up @@ -82,7 +82,7 @@ receivers:
http:
endpoint: "localhost:4318"
exporters:
logging:
debug:
awsxray:
prometheusremotewrite: $${${module.remote_configuration.configuration_uri}}

Expand All @@ -95,7 +95,7 @@ service:
exporters: [awsxray]
metrics:
receivers: [otlp]
exporters: [logging, prometheusremotewrite]
exporters: [debug, prometheusremotewrite]
telemetry:
metrics:
address: localhost:8888
Expand Down
6 changes: 3 additions & 3 deletions java/integration-tests/aws-sdk/agent/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ resource "aws_lambda_layer_version" "collector_layer" {
count = var.enable_collector_layer ? 1 : 0
layer_name = var.collector_layer_name
filename = "${path.module}/../../../../opentelemetry-lambda/collector/build/opentelemetry-collector-layer-${local.architecture}.zip"
compatible_runtimes = ["nodejs14.x", "nodejs16.x", "nodejs18.x"]
compatible_runtimes = ["nodejs16.x", "nodejs18.x", "nodejs20.x", "nodejs22.x"]
license_info = "Apache-2.0"
source_code_hash = filebase64sha256("${path.module}/../../../../opentelemetry-lambda/collector/build/opentelemetry-collector-layer-${local.architecture}.zip")
}
Expand Down Expand Up @@ -62,7 +62,7 @@ receivers:
http:
endpoint: "localhost:4318"
exporters:
logging:
debug:
awsxray:
prometheusremotewrite:
endpoint: "${aws_prometheus_workspace.test_amp_workspace[0].prometheus_endpoint}api/v1/remote_write"
Expand All @@ -78,7 +78,7 @@ service:
exporters: [awsxray]
metrics:
receivers: [otlp]
exporters: [logging, prometheusremotewrite]
exporters: [debug, prometheusremotewrite]
telemetry:
metrics:
address: localhost:8888
Expand Down
2 changes: 1 addition & 1 deletion java/integration-tests/aws-sdk/wrapper/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ resource "aws_lambda_layer_version" "collector_layer" {
count = var.enable_collector_layer ? 1 : 0
layer_name = var.collector_layer_name
filename = "${path.module}/../../../../opentelemetry-lambda/collector/build/opentelemetry-collector-layer-${local.architecture}.zip"
compatible_runtimes = ["nodejs14.x", "nodejs16.x", "nodejs18.x"]
compatible_runtimes = ["nodejs16.x", "nodejs18.x", "nodejs20.x", "nodejs22.x"]
license_info = "Apache-2.0"
source_code_hash = filebase64sha256("${path.module}/../../../../opentelemetry-lambda/collector/build/opentelemetry-collector-layer-${local.architecture}.zip")
}
Expand Down
2 changes: 1 addition & 1 deletion java/integration-tests/okhttp/wrapper/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ resource "aws_lambda_layer_version" "collector_layer" {
count = var.enable_collector_layer ? 1 : 0
layer_name = var.collector_layer_name
filename = "${path.module}/../../../../opentelemetry-lambda/collector/build/opentelemetry-collector-layer-${local.architecture}.zip"
compatible_runtimes = ["nodejs14.x", "nodejs16.x", "nodejs18.x"]
compatible_runtimes = ["nodejs16.x", "nodejs18.x", "nodejs20.x", "nodejs22.x"]
license_info = "Apache-2.0"
source_code_hash = filebase64sha256("${path.module}/../../../../opentelemetry-lambda/collector/build/opentelemetry-collector-layer-${local.architecture}.zip")
}
Expand Down
4 changes: 2 additions & 2 deletions nodejs/integration-tests/aws-sdk/wrapper/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ locals {
resource "aws_lambda_layer_version" "sdk_layer" {
layer_name = var.sdk_layer_name
filename = "${path.module}/../../../../opentelemetry-lambda/nodejs/packages/layer/build/layer.zip"
compatible_runtimes = ["nodejs16.x", "nodejs18.x"]
compatible_runtimes = ["nodejs16.x", "nodejs18.x", "nodejs20.x", "nodejs22.x"]
license_info = "Apache-2.0"
source_code_hash = filebase64sha256("${path.module}/../../../../opentelemetry-lambda/nodejs/packages/layer/build/layer.zip")
}
Expand All @@ -14,7 +14,7 @@ resource "aws_lambda_layer_version" "collector_layer" {
count = var.enable_collector_layer ? 1 : 0
layer_name = var.collector_layer_name
filename = "${path.module}/../../../../opentelemetry-lambda/collector/build/opentelemetry-collector-layer-${local.architecture}.zip"
compatible_runtimes = ["nodejs16.x", "nodejs18.x"]
compatible_runtimes = ["nodejs16.x", "nodejs18.x", "nodejs20.x", "nodejs22.x"]
license_info = "Apache-2.0"
source_code_hash = filebase64sha256("${path.module}/../../../../opentelemetry-lambda/collector/build/opentelemetry-collector-layer-${local.architecture}.zip")
}
Expand Down
4 changes: 4 additions & 0 deletions nodejs/scripts/otel-handler
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,8 @@

export NODE_OPTIONS="--require /opt/adot-extension.js ${NODE_OPTIONS}"

if [[ -z "$OTEL_PROPAGATORS" ]]; then
export OTEL_PROPAGATORS="tracecontext,baggage,xray-lambda"
fi

source /opt/otel-handler-upstream
2 changes: 1 addition & 1 deletion python/integration-tests/aws-sdk/wrapper/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ resource "aws_lambda_layer_version" "collector_layer" {
count = var.enable_collector_layer ? 1 : 0
layer_name = var.collector_layer_name
filename = "${path.module}/../../../../opentelemetry-lambda/collector/build/opentelemetry-collector-layer-${local.architecture}.zip"
compatible_runtimes = ["nodejs14.x", "nodejs16.x", "nodejs18.x"]
compatible_runtimes = ["nodejs16.x", "nodejs18.x", "nodejs20.x", "nodejs22.x"]
license_info = "Apache-2.0"
source_code_hash = filebase64sha256("${path.module}/../../../../opentelemetry-lambda/collector/build/opentelemetry-collector-layer-${local.architecture}.zip")
}
Expand Down
2 changes: 1 addition & 1 deletion python/scripts/otel-instrument
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ END_DOCUMENTATION
# - Set `OTEL_PROPAGATORS` if not yet set, and include the xray propagator

if [ -z ${OTEL_PROPAGATORS} ]; then
export OTEL_PROPAGATORS="tracecontext,baggage,xray";
export OTEL_PROPAGATORS="tracecontext,baggage,xray-lambda";
fi

# - Call the upstream configure OTel script
Expand Down
Loading