Skip to content
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
2 changes: 1 addition & 1 deletion .github/workflows/canary.yml
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ jobs:
submodules: recursive
- uses: actions/setup-go@v5
with:
go-version: '~1.24.3'
go-version: '~1.26.2'
check-latest: true
- uses: actions/setup-java@v4
if: ${{ matrix.language == 'java' }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/main-build-java.yml
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ jobs:
submodules: recursive
- uses: actions/setup-go@v5
with:
go-version: '~1.24.3'
go-version: '~1.26.2'
check-latest: true
- uses: actions/setup-java@v4
with:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/main-build-nodejs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ jobs:
submodules: recursive
- uses: actions/setup-go@v5
with:
go-version: '~1.24.3'
go-version: '~1.26.2'
check-latest: true
- uses: actions/setup-node@v4
with:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/main-build-python.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ jobs:
submodules: recursive
- uses: actions/setup-go@v5
with:
go-version: '~1.24.3'
go-version: '~1.26.2'
check-latest: true
- uses: actions/setup-python@v5
with:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/main-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ jobs:
submodules: recursive
- uses: actions/setup-go@v5
with:
go-version: '~1.24.3'
go-version: '~1.26.2'
check-latest: true
- uses: actions/setup-dotnet@v4
if: ${{ matrix.language == 'dotnet' }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/pr-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ jobs:
submodules: true
- uses: actions/setup-go@v5
with:
go-version: '~1.24.3'
go-version: '~1.26.2'
check-latest: true
- uses: actions/setup-java@v4
if: ${{ matrix.language == 'java' }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -273,7 +273,7 @@ jobs:
# above, always setup go 1.18.
# if: ${{ env.TEST_LANGUAGE == 'go' }}
with:
go-version: '~1.24.3'
go-version: '~1.26.2'
check-latest: true
- name: download layer tf file
uses: actions/download-artifact@v4
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/soaking.yml
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ jobs:
submodules: recursive
- uses: actions/setup-go@v5
with:
go-version: '~1.24.3'
go-version: '~1.26.2'
check-latest: true
- uses: actions/setup-java@v4
if: ${{ matrix.language == 'java' }}
Expand Down
3 changes: 0 additions & 3 deletions adot/collector/config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,3 @@ service:
metrics:
receivers: [otlp]
exporters: [debug]
telemetry:
metrics:
address: localhost:8888
2 changes: 2 additions & 0 deletions adot/collector/lambdacomponents/default.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ import (
"go.opentelemetry.io/collector/exporter/otlphttpexporter"
"go.opentelemetry.io/collector/otelcol"
"go.opentelemetry.io/collector/receiver/otlpreceiver"
"go.opentelemetry.io/collector/service/telemetry/otelconftelemetry"
"go.uber.org/multierr"
)

Expand Down Expand Up @@ -68,6 +69,7 @@ func Components() (
Extensions: extensions,
Receivers: receivers,
Exporters: exporters,
Telemetry: otelconftelemetry.NewFactory(),
}

return factories, errs
Expand Down
4 changes: 3 additions & 1 deletion adot/collector/lambdacomponents/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ require (
go.opentelemetry.io/collector/exporter/otlphttpexporter v0.151.0
go.opentelemetry.io/collector/otelcol v0.151.0
go.opentelemetry.io/collector/receiver/otlpreceiver v0.151.0
go.opentelemetry.io/collector/service v0.151.0
go.uber.org/multierr v1.11.0
)

Expand Down Expand Up @@ -172,11 +173,12 @@ require (
go.opentelemetry.io/collector/receiver/receiverhelper v0.151.0 // indirect
go.opentelemetry.io/collector/receiver/receivertest v0.151.0 // indirect
go.opentelemetry.io/collector/receiver/xreceiver v0.151.0 // indirect
go.opentelemetry.io/collector/service v0.151.0 // indirect
go.opentelemetry.io/collector/service/hostcapabilities v0.151.0 // indirect
go.opentelemetry.io/contrib/bridges/otelzap v0.18.0 // indirect
go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.68.0 // indirect
go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.68.0 // indirect
go.opentelemetry.io/contrib/otelconf v0.23.0 // indirect
go.opentelemetry.io/contrib/propagators/b3 v1.43.0 // indirect
go.opentelemetry.io/otel v1.43.0 // indirect
go.opentelemetry.io/otel/exporters/otlp/otlplog/otlploggrpc v0.19.0 // indirect
go.opentelemetry.io/otel/exporters/otlp/otlplog/otlploghttp v0.19.0 // indirect
Expand Down
6 changes: 6 additions & 0 deletions adot/collector/lambdacomponents/go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -547,12 +547,16 @@ go.opentelemetry.io/collector/service/hostcapabilities v0.151.0 h1:+VbDE5ZRXKD6n
go.opentelemetry.io/collector/service/hostcapabilities v0.151.0/go.mod h1:GlnaFXJAqeTgAnEDIz7HI28ydwoZcbJ7Niyom+wVBMo=
go.opentelemetry.io/collector/service/telemetry/telemetrytest v0.151.0 h1:L4r/rZBeDBaVnU/EeQT6H2/msGAyzpKMHXTP8Vwr1NE=
go.opentelemetry.io/collector/service/telemetry/telemetrytest v0.151.0/go.mod h1:/e2FJ+CEpIttRTzP37HdrgKuwfIj6dcZsa2jZajL6Vw=
go.opentelemetry.io/contrib/bridges/otelzap v0.18.0 h1:EkWTww6Nqs2P29r01NeuNsG7qNJtoWWaT1fx/CKode8=
go.opentelemetry.io/contrib/bridges/otelzap v0.18.0/go.mod h1:lj3bgA/c7nJy0NhxqyvWJFC30aTgB+G0RKDdLbvJ4QM=
go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.68.0 h1:0Qx7VGBacMm9ZENQ7TnNObTYI4ShC+lHI16seduaxZo=
go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.68.0/go.mod h1:Sje3i3MjSPKTSPvVWCaL8ugBzJwik3u4smCjUeuupqg=
go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.68.0 h1:CqXxU8VOmDefoh0+ztfGaymYbhdB/tT3zs79QaZTNGY=
go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.68.0/go.mod h1:BuhAPThV8PBHBvg8ZzZ/Ok3idOdhWIodywz2xEcRbJo=
go.opentelemetry.io/contrib/otelconf v0.23.0 h1:s3C7KdMYiutf4rC8hKFA0WOIDG+gIru8ajjQKS59ir8=
go.opentelemetry.io/contrib/otelconf v0.23.0/go.mod h1:0kN2tcccZS82e7IZlo045gkcL8/8dup1k25sf9ypGxM=
go.opentelemetry.io/contrib/propagators/b3 v1.43.0 h1:CETqV3QLLPTy5yNrqyMr41VnAOOD4lsRved7n4QG00A=
go.opentelemetry.io/contrib/propagators/b3 v1.43.0/go.mod h1:Q4mCiCdziYzpNR0g+6UqVotAlCDZdzz6L8jwY4knOrw=
go.opentelemetry.io/contrib/zpages v0.68.0 h1:H5yrUwxPrbvhzdBxjQD+VXMtPjIBfp8NWNVvQT8E30M=
go.opentelemetry.io/contrib/zpages v0.68.0/go.mod h1:sZGctYYO4UOHItj9bx3F+t/s+u1Fv8CHCJ5s2eR2cjU=
go.opentelemetry.io/otel v1.43.0 h1:mYIM03dnh5zfN7HautFE4ieIig9amkNANT+xcVxAj9I=
Expand Down Expand Up @@ -581,6 +585,8 @@ go.opentelemetry.io/otel/exporters/stdout/stdouttrace v1.43.0 h1:mS47AX77OtFfKG4
go.opentelemetry.io/otel/exporters/stdout/stdouttrace v1.43.0/go.mod h1:PJnsC41lAGncJlPUniSwM81gc80GkgWJWr3cu2nKEtU=
go.opentelemetry.io/otel/log v0.19.0 h1:KUZs/GOsw79TBBMfDWsXS+KZ4g2Ckzksd1ymzsIEbo4=
go.opentelemetry.io/otel/log v0.19.0/go.mod h1:5DQYeGmxVIr4n0/BcJvF4upsraHjg6vudJJpnkL6Ipk=
go.opentelemetry.io/otel/log/logtest v0.19.0 h1:HdSsl4ndTK15LtJGLWBfMsSlLrCgSeE3VMzwOrLYiYs=
go.opentelemetry.io/otel/log/logtest v0.19.0/go.mod h1:c1sH1nOHTwfMCWhhQTdWGqxgDjZhtkbkzAqGGyj0Ijs=
go.opentelemetry.io/otel/metric v1.43.0 h1:d7638QeInOnuwOONPp4JAOGfbCEpYb+K6DVWvdxGzgM=
go.opentelemetry.io/otel/metric v1.43.0/go.mod h1:RDnPtIxvqlgO8GRW18W6Z/4P462ldprJtfxHxyKd2PY=
go.opentelemetry.io/otel/sdk v1.43.0 h1:pi5mE86i5rTeLXqoF/hhiBtUNcrAGHLKQdhg4h4V9Dg=
Expand Down
39 changes: 39 additions & 0 deletions adot/nodejs/sample-apps/aws-sdk/lambda/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
import {
APIGatewayProxyEvent,
APIGatewayProxyResult,
Context,
} from 'aws-lambda';

import { STSClient, GetCallerIdentityCommand } from '@aws-sdk/client-sts';

const sts = new STSClient({});

export const handler = async (
event: APIGatewayProxyEvent,
_context: Context,
): Promise<APIGatewayProxyResult> => {
console.log('Received event:', JSON.stringify(event, null, 2));
console.log('Received context:', JSON.stringify(_context, null, 2));

try {
// Make an instrumented AWS SDK call so the emitted trace contains an
// STS GetCallerIdentity segment (asserted by the soak trace validator).
await sts.send(new GetCallerIdentityCommand({}));

// The soak trace validator extracts the X-Ray trace ID from the HTTP
// response body (see the go and python sample apps, which return
// `_X_AMZN_TRACE_ID`). Returning the caller-identity payload instead
// leaves the validator with no trace ID (`trace_id=null`) and it can
// never fetch the trace. Return the trace header so validation can run.
return {
statusCode: 200,
body: JSON.stringify(process.env._X_AMZN_TRACE_ID ?? ''),
};
} catch (error) {
console.error('Error retrieving caller identity:', error);
return {
statusCode: 500,
body: 'Internal Server Error',
};
}
};
12 changes: 4 additions & 8 deletions adot/utils/expected-templates/go-aws-sdk-wrapper.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,18 +9,14 @@
"name":"lambda-go.*"
},
{
"name":"lambda-go.*"
"name":"S3.ListBuckets",
"inferred":true
},
{
"name":"S3",
"origin":"AWS::S3",
"inferred":true,
"aws":{
"operation":"ListBuckets"
}
"name":"lambda-go.*"
},
{
"name":"api.github.com",
"name":"HTTP GET",
"inferred":true,
"http":{
"request":{
Expand Down
9 changes: 7 additions & 2 deletions adot/utils/expected-templates/nodejs-aws-sdk-wrapper.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,11 @@
"name": "lambda-nodejs.*"
},
{
"name": "s3"
"name": "STS",
"origin": "AWS::STS",
"inferred": true,
"aws": {
"operation": "GetCallerIdentity"
}
}
]
]
3 changes: 0 additions & 3 deletions java/integration-tests/aws-sdk/agent/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -79,9 +79,6 @@ service:
metrics:
receivers: [otlp]
exporters: [debug, prometheusremotewrite]
telemetry:
metrics:
address: localhost:8888
EOT
filename = "config.yaml"
}
Expand Down
50 changes: 41 additions & 9 deletions nodejs/integration-tests/aws-sdk/wrapper/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -19,22 +19,54 @@ resource "aws_lambda_layer_version" "collector_layer" {
source_code_hash = filebase64sha256("${path.module}/../../../../opentelemetry-lambda/collector/build/opentelemetry-collector-layer-${local.architecture}.zip")
}

module "hello-lambda-function" {
source = "../../../../opentelemetry-lambda/nodejs/sample-apps/aws-sdk/deploy/wrapper"
# NOTE: The upstream `nodejs/sample-apps/aws-sdk/deploy/wrapper` module was
# refactored (OTel Collector v0.151.0) to build layer ARNs internally from
# published layer versions and no longer accepts `collector_layer_arn` /
# `sdk_layer_arn` inputs. The integration/soak test must attach the layers we
# just built locally, so we instantiate the Lambda function directly here -
# mirroring the python integration test - instead of consuming that module.
module "test-function" {
source = "terraform-aws-modules/lambda/aws"
version = "7.19.0"

architectures = compact([var.architecture])
function_name = var.function_name
handler = "index.handler"
runtime = var.runtime

create_package = false
local_existing_package = "${path.module}/../../../../opentelemetry-lambda/nodejs/sample-apps/aws-sdk/build/function.zip"

memory_size = 384
timeout = 20

layers = compact([
var.enable_collector_layer ? aws_lambda_layer_version.collector_layer[0].arn : null,
aws_lambda_layer_version.sdk_layer.arn
])

environment_variables = {
AWS_LAMBDA_EXEC_WRAPPER = "/opt/otel-handler"
}

tracing_mode = var.tracing_mode
}

module "api-gateway" {
source = "../../../../opentelemetry-lambda/utils/terraform/api-gateway-proxy"

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
function_name = module.test-function.lambda_function_name
function_invoke_arn = module.test-function.lambda_function_invoke_arn
enable_xray_tracing = var.tracing_mode == "Active"
}

resource "aws_iam_role_policy_attachment" "hello-lambda-cloudwatch-insights" {
role = module.hello-lambda-function.function_role_name
role = module.test-function.lambda_role_name
policy_arn = "arn:aws:iam::aws:policy/service-role/AWSLambdaBasicExecutionRole"
}

resource "aws_iam_role_policy_attachment" "test_xray" {
role = module.hello-lambda-function.function_role_name
role = module.test-function.lambda_role_name
policy_arn = "arn:aws:iam::aws:policy/AWSXRayDaemonWriteAccess"
}
4 changes: 2 additions & 2 deletions nodejs/integration-tests/aws-sdk/wrapper/outputs.tf
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
output "api-gateway-url" {
value = module.hello-lambda-function.api-gateway-url
value = module.api-gateway.api_gateway_url
}

output "function_role_name" {
value = module.hello-lambda-function.function_role_name
value = module.test-function.lambda_role_name
}

output "collector_layer_arn" {
Expand Down
Loading