Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
43 commits
Select commit Hold shift + click to select a range
9a63f14
feat(integration-tests): scaffold integration-tests setup
wpessers May 9, 2026
80ef0e9
feat(integration-tests): add nodejs lambda handler
wpessers May 9, 2026
8c5931e
feat(integration-tests): set up test runner and cdk stack
wpessers May 9, 2026
8210d25
feat(integration-tests): add nodejs test
wpessers May 9, 2026
7e5b6bf
feat(integration-tests): prepare for possible concurrent runs on gh a…
wpessers May 9, 2026
89f1d2e
docs(integration-tests): add initial readme
wpessers May 9, 2026
d4379a2
feat(integration-tests): tag resources for tracking
wpessers May 9, 2026
c17e731
refactor(integration-tests): remove unused tsconfig options
wpessers May 10, 2026
c055876
refactor(integration-tests): rename vitest config file
wpessers May 10, 2026
705d282
refactor(integration-tests): extract magic numbers to constants in vi…
wpessers May 10, 2026
dff9a5f
refactor(integration-tests): type supported languages and extract inl…
wpessers May 10, 2026
edc77f0
refactor(integration-tests): make LANGUAGE_CONFIG const source of tru…
wpessers May 10, 2026
d2b7dee
refactor(integration-tests): use named imports
wpessers May 10, 2026
5af8e5f
refactor(integration-tests): swap manual setTimeout wrapped in Promis…
wpessers May 10, 2026
3dc9a20
refactor(integration-tests): extract options type and lower poll inte…
wpessers May 10, 2026
08d5f0c
feat(integration-tests): finetune log event filtering and assertions
wpessers May 10, 2026
57294fd
refactor(integration-tests): remove redundant assertion
wpessers May 10, 2026
8547518
feat(integration-tests): add python test and support running in isola…
wpessers May 10, 2026
2525cef
feat(integration-tests): add github actions workflow and cloudformati…
wpessers May 11, 2026
b42ca6f
fix(integration-tests): add required roles for cdk toolkit lib to dep…
wpessers May 13, 2026
749bc54
refactor(integration-tests): use role assumed through gh oidc for int…
wpessers May 14, 2026
e7c4298
refactor(integration-tests): prefix layer version name with stackname…
wpessers May 14, 2026
48bc946
refactor(actions): use composite actions to allow reuse of existing b…
wpessers May 26, 2026
cf05645
refactor(actions): use composite actions inside integration test work…
wpessers May 26, 2026
673e796
feat(integration-tests): run integration test automatically for pytho…
wpessers May 27, 2026
a92d096
refactor(actions): extract java layer building to composite action
wpessers May 28, 2026
aed38ca
feat(integration-tests): add java layers integration tests and setup
wpessers May 29, 2026
c11d340
docs(integration-tests): document java build for running locally
wpessers May 29, 2026
eef790a
feat(integration-tests): support javaagent and javawrapper layer inte…
wpessers May 29, 2026
1861ce4
feat(integration-tests): trigger integration tests on release of java…
wpessers May 29, 2026
f124358
feat(integration-tests): add ruby lambda handler for testing
wpessers May 30, 2026
81df463
feat(integration-tests): add ruby integration test and setup
wpessers May 30, 2026
6c71937
feat(integration-tests): extract composite build action and add ruby …
wpessers May 30, 2026
4dc31c5
feat: assert instrumentation scopes in java and ruby integration tests
wpessers May 31, 2026
3e6842b
fix(ci): remove trailing space
wpessers May 31, 2026
b317ed0
feat(integration-tests): assert instrumentation scopes in java and ru…
wpessers May 31, 2026
c25d3f6
chore(integration-tests): change strict assertion to contains check, …
wpessers May 31, 2026
ab07849
refactor(integration-tests): deduplicate language specific tests into…
wpessers May 31, 2026
3469eed
feat(integration-tests): gate nodejs layer release on integration tes…
wpessers May 31, 2026
3e8eee6
docs(integration-tests): document gh actions prerequisites and local …
wpessers May 31, 2026
497991f
refactor(integration-tests): rename role arn secret
wpessers May 31, 2026
3e4c8da
feat(integration-tests): allow passing already existing gh oidc provider
wpessers May 31, 2026
c1f85e1
docs(integration-tests): document setup with existing gh oidc provider
wpessers May 31, 2026
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
35 changes: 35 additions & 0 deletions .github/actions/build-collector-layer/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: 'Build Collector Lambda Layer'
description: 'Builds the OpenTelemetry Collector Lambda layer for the given architecture'

inputs:
architecture:
description: 'Target architecture (amd64 or arm64)'
required: false
default: amd64

outputs:
artifact-path:
description: 'Absolute path to the built layer zip'
value: ${{ github.workspace }}/collector/build/opentelemetry-collector-layer-${{ inputs.architecture }}.zip
component-version:
description: 'Collector binary version. Only set when architecture is amd64.'
value: ${{ steps.version.outputs.component-version }}

runs:
using: composite
steps:
- uses: actions/setup-go@4a3601121dd01d1626a1e23e37211e3254c1c06c # v6.4.0
with:
go-version-file: collector/go.mod

- name: Build collector layer
shell: bash
run: make -C collector package GOARCH=${{ inputs.architecture }}

- name: Save collector version
if: ${{ inputs.architecture == 'amd64' }}
id: version
shell: bash
run: |
COMPONENT_VERSION=$(${{ github.workspace }}/collector/build/extensions/collector -v)
echo "component-version=$COMPONENT_VERSION" >> "$GITHUB_OUTPUT"
51 changes: 51 additions & 0 deletions .github/actions/build-java-layer/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
name: 'Build Java Lambda Layer'
description: 'Builds the OpenTelemetry Java javaagent and javawrapper Lambda layers'

outputs:
javaagent-artifact-path:
description: 'Absolute path to the javaagent layer zip artifact'
value: ${{ github.workspace }}/java/layer-javaagent/build/distributions/opentelemetry-javaagent-layer.zip
javawrapper-artifact-path:
description: 'Absolute path to the javawrapper layer zip artifact'
value: ${{ github.workspace }}/java/layer-wrapper/build/distributions/opentelemetry-javawrapper-layer.zip
javaagent-version:
description: 'OpenTelemetry Java agent version included in the layer'
value: ${{ steps.javaagent-version.outputs.javaagent-version }}
javawrapper-version:
description: 'OpenTelemetry Java instrumentation version included in the wrapper layer'
value: ${{ steps.javawrapper-version.outputs.javawrapper-version }}

runs:
using: composite
steps:
- uses: actions/setup-java@be666c2fcd27ec809703dec50e508c2fdc7f6654 # v5.2.0
with:
distribution: corretto
java-version: 17

- name: Setup Gradle
uses: gradle/actions/setup-gradle@50e97c2cd7a37755bbfafc9c5b7cafaece252f6e # v6.1.0
with:
cache-provider: basic # MIT licensed (see https://github.com/gradle/actions/releases/tag/v6.1.0)

- name: Execute Gradle build
shell: bash
run: |
cd java
./gradlew :layer-javaagent:assemble :layer-wrapper:assemble --scan --stacktrace

- name: Save Javaagent Version
id: javaagent-version
shell: bash
run: |
unzip java/layer-javaagent/build/distributions/opentelemetry-javaagent-layer.zip
JAVAAGENT_VERSION=$(java -jar ./opentelemetry-javaagent.jar)
echo "javaagent-version=$JAVAAGENT_VERSION" >> "$GITHUB_OUTPUT"

- name: Save Java Wrapper Version
id: javawrapper-version
shell: bash
run: |
cd java
JAVAWRAPPER_VERSION=$(./gradlew layer-wrapper:printOtelJavaInstrumentationVersion -q)
echo "javawrapper-version=$JAVAWRAPPER_VERSION" >> "$GITHUB_OUTPUT"
34 changes: 34 additions & 0 deletions .github/actions/build-layer/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: 'Build OTel Lambda Layer'
description: 'Dispatches to the matching build-<language>-layer composite action.'

inputs:
language:
description: 'Language of the layer to build (nodejs, python, ruby, javaagent, javawrapper)'
required: true

outputs:
artifact-path:
description: 'Absolute path to the built layer zip'
value: ${{ steps.nodejs.outputs.artifact-path || steps.python.outputs.artifact-path || steps.ruby.outputs.artifact-path || (inputs.language == 'javaagent' && steps.java.outputs.javaagent-artifact-path || steps.java.outputs.javawrapper-artifact-path) }}
component-version:
description: 'SDK version included in the layer'
value: ${{ steps.nodejs.outputs.component-version || steps.python.outputs.component-version || steps.ruby.outputs.component-version || (inputs.language == 'javaagent' && steps.java.outputs.javaagent-version || steps.java.outputs.javawrapper-version) }}

runs:
using: composite
steps:
- if: ${{ inputs.language == 'nodejs' }}
id: nodejs
uses: ./.github/actions/build-nodejs-layer

- if: ${{ inputs.language == 'python' }}
id: python
uses: ./.github/actions/build-python-layer

- if: ${{ inputs.language == 'ruby' }}
id: ruby
uses: ./.github/actions/build-ruby-layer

- if: ${{ inputs.language == 'javaagent' || inputs.language == 'javawrapper' }}
id: java
uses: ./.github/actions/build-java-layer
37 changes: 37 additions & 0 deletions .github/actions/build-nodejs-layer/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
name: 'Build Node.js Lambda Layer'
description: 'Builds the OpenTelemetry Node.js Lambda layer'

outputs:
artifact-path:
description: 'Absolute path to the built layer zip'
value: ${{ github.workspace }}/nodejs/packages/layer/build/opentelemetry-nodejs-layer.zip
component-version:
description: 'OpenTelemetry Node.js SDK version included in the layer'
value: ${{ steps.version.outputs.component-version }}

runs:
using: composite
steps:
- uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0
with:
node-version: 18

- name: Build Node.js layer
shell: bash
working-directory: nodejs
run: |
npm ci
npm run build

- name: Save Node.js SDK version
id: version
shell: bash
working-directory: nodejs/packages/layer/scripts
run: |
SDK_VERSION=$(npm list @opentelemetry/core --depth=0 | grep @opentelemetry/core | sed 's/^.*@//')
echo "component-version=$SDK_VERSION" >> "$GITHUB_OUTPUT"

- name: Rename layer zip
shell: bash
working-directory: nodejs/packages/layer/build
run: mv layer.zip opentelemetry-nodejs-layer.zip
30 changes: 30 additions & 0 deletions .github/actions/build-python-layer/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: 'Build Python Lambda Layer'
description: 'Builds the OpenTelemetry Python Lambda layer'

outputs:
artifact-path:
description: 'Absolute path to the layer zip artifact'
value: ${{ github.workspace }}/python/src/build/opentelemetry-python-layer.zip
component-version:
description: 'OpenTelemetry Python SDK version included in the layer'
value: ${{ steps.version.outputs.component-version }}

runs:
using: composite
steps:
- uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0
with:
python-version: '3.9'

- name: Save Python OpenTelemetry SDK version
id: version
shell: bash
working-directory: python/src
run: |
SDK_VERSION=$(grep opentelemetry-sdk otel/otel_sdk/requirements.txt | sed 's/.*==\([^ ]*\).*/\1/')
echo "component-version=$SDK_VERSION" >> "$GITHUB_OUTPUT"

- name: Build Python layer
shell: bash
working-directory: python/src
run: ./build.sh
28 changes: 28 additions & 0 deletions .github/actions/build-ruby-layer/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: 'Build Ruby Lambda Layer'
description: 'Builds the OpenTelemetry Ruby Lambda layer'

outputs:
artifact-path:
description: 'Absolute path to the layer zip artifact'
value: ${{ github.workspace }}/ruby/src/build/opentelemetry-ruby-layer.zip
component-version:
description: 'OpenTelemetry Ruby SDK version included in the layer'
value: ${{ steps.version.outputs.component-version }}

runs:
using: composite
steps:
- name: Build Ruby layer
shell: bash
working-directory: ruby/src
run: ./build.sh

- name: Save Ruby OpenTelemetry SDK version
id: version
shell: bash
working-directory: ruby/src
run: |
unzip -q build/opentelemetry-ruby-layer.zip
export GEM_PATH=$PWD/ruby/gems/3.3.0/
SDK_VERSION=$(ruby -e 'require "opentelemetry-sdk"; puts OpenTelemetry::SDK::VERSION')
echo "component-version=$SDK_VERSION" >> "$GITHUB_OUTPUT"
145 changes: 145 additions & 0 deletions .github/workflows/integration-test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,145 @@
name: "Integration Tests"

on:
workflow_dispatch:
inputs:
language:
description: 'Language to test (or all)'
required: true
type: choice
options:
- all
- nodejs
- python
- ruby
- javaagent
- javawrapper
default: all
workflow_call:
inputs:
language:
description: 'Language to test (or all)'
required: true
type: string
use-existing-layer-artifact:
description: 'Use an existing instrumentation layer artifact instead of building from scratch'
required: false
default: false
type: boolean

permissions:
contents: read

jobs:
prepare-languages:
runs-on: ubuntu-latest
outputs:
languages: ${{ steps.prepare-languages.outputs.languages }}
steps:
- id: prepare-languages
name: Prepare Languages
run: |
if [ "${{ inputs.language }}" = "all" ]; then
languages='["nodejs", "python", "ruby", "javaagent", "javawrapper"]'
else
languages='["${{ inputs.language }}"]'
fi
echo "languages=${languages}" >> "$GITHUB_OUTPUT"

build-collector:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- uses: ./.github/actions/build-collector-layer
id: build
- uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
with:
name: opentelemetry-collector-layer-amd64.zip
path: ${{ steps.build.outputs.artifact-path }}

build-layer:
needs: prepare-languages
if: ${{ !inputs.use-existing-layer-artifact }}
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
language: ${{ fromJson(needs.prepare-languages.outputs.languages) }}
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- uses: ./.github/actions/build-layer
id: build
with:
language: ${{ matrix.language }}
- uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
with:
name: opentelemetry-${{ matrix.language }}-layer.zip
path: ${{ steps.build.outputs.artifact-path }}

test:
needs: [prepare-languages, build-collector, build-layer]
if: |
!cancelled() &&
needs.build-collector.result == 'success' &&
(needs.build-layer.result == 'success' || needs.build-layer.result == 'skipped')
strategy:
fail-fast: false
matrix:
language: ${{ fromJson(needs.prepare-languages.outputs.languages) }}
runs-on: ubuntu-latest
permissions:
contents: read
id-token: write
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2

- uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0
with:
node-version: 22

- uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
with:
name: opentelemetry-collector-layer-amd64.zip
path: artifacts/

- uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
with:
name: opentelemetry-${{ matrix.language }}-layer.zip
path: artifacts/

- uses: aws-actions/configure-aws-credentials@ec61189d14ec14c8efccab744f656cffd0e33f37 # v6.1.0
with:
role-to-assume: ${{ secrets.INTEGRATION_TEST_ROLE_ARN }}
role-duration-seconds: 1200
aws-region: us-east-1

- if: ${{ startsWith(matrix.language, 'java') }}
uses: actions/setup-java@be666c2fcd27ec809703dec50e508c2fdc7f6654 # v5.2.0
with:
distribution: corretto
java-version: 17

- name: Setup Gradle
if: ${{ startsWith(matrix.language, 'java') }}
uses: gradle/actions/setup-gradle@50e97c2cd7a37755bbfafc9c5b7cafaece252f6e # v6.1.0
with:
cache-provider: basic # MIT licensed (see https://github.com/gradle/actions/releases/tag/v6.1.0)

- name: Build Java handler jar
if: ${{ startsWith(matrix.language, 'java') }}
run: ./gradlew shadowJar
working-directory: integration-tests/handlers/java

- name: Install integration test dependencies
run: npm ci
working-directory: integration-tests

- name: Run integration tests
run: npx vitest run --config vitest.config.ts
working-directory: integration-tests
env:
TEST_LANGUAGE: ${{ matrix.language }}
COLLECTOR_LAYER_ZIP: ${{ github.workspace }}/artifacts/opentelemetry-collector-layer-amd64.zip
INSTRUMENTATION_LAYER_ZIP: ${{ github.workspace }}/artifacts/opentelemetry-${{ matrix.language }}-layer.zip
GITHUB_RUN_ID: ${{ github.run_id }}
GITHUB_RUN_ATTEMPT: ${{ github.run_attempt }}
Loading
Loading