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
6 changes: 3 additions & 3 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -398,7 +398,7 @@ jobs:
upload_file_to_release "$release_id" "checksum.txt"

upload_file_to_release "$release_id" "agent/build/libs/solarwinds-apm-agent.jar"
upload_file_to_release "$release_id" "custom/shared/src/main/resources/solarwinds-apm-config.json"
upload_file_to_release "$release_id" "libs/shared/src/main/resources/solarwinds-apm-config.json"

source /ci-scripts/bin/helpers.sh
send_to_slack "A new release is ready \`$VERSION\`"
Expand Down Expand Up @@ -426,7 +426,7 @@ jobs:
s3://ssp-stage-global-agent-binaries/apm/java/$AGENTVERSION/solarwinds-apm-agent-lambda.jar \
--acl public-read

aws s3 cp custom/shared/src/main/resources/solarwinds-apm-config.json \
aws s3 cp libs/shared/src/main/resources/solarwinds-apm-config.json \
s3://ssp-stage-global-agent-binaries/apm/java/$AGENTVERSION/solarwinds-apm-config.json \
--acl public-read
- run:
Expand Down Expand Up @@ -480,7 +480,7 @@ jobs:
s3://ssp-prod-global-agent-binaries/apm/java/$AGENTVERSION/solarwinds-apm-agent.jar \
--acl public-read

aws s3 cp custom/shared/src/main/resources/solarwinds-apm-config.json \
aws s3 cp libs/shared/src/main/resources/solarwinds-apm-config.json \
s3://ssp-prod-global-agent-binaries/apm/java/$AGENTVERSION/solarwinds-apm-config.json \
--acl public-read
- run:
Expand Down
5 changes: 3 additions & 2 deletions .github/copilot-instructions.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,9 @@ This is a **multi-module Gradle project** with the following architecture:
- **agent-lambda/** - Lambda-specific agent (exports via OTLP)
- **bootstrap/** - Bootstrap classes loaded early in JVM lifecycle
- **custom/** - Custom SolarWinds extensions and configurations
- `custom/shared/` - Shared code between agent and agent-lambda
- `custom/lambda/` - Lambda-specific extensions
- **libs/** - Custom SolarWinds libraries
- `libs/shared/` - Shared code between agent and agent-lambda
- `libs/lambda/` - Lambda-specific extensions
- **instrumentation/** - Custom instrumentation modules
- `jdbc/` - JDBC instrumentation
- `spring-webmvc/` - Spring WebMVC instrumentation
Expand Down
106 changes: 106 additions & 0 deletions .github/workflows/lambda-test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,106 @@
name: Lambda Release Test

on:
workflow_dispatch:
workflow_run:
workflows: [Push]
types:
- completed

permissions:
packages: write
contents: read
id-token: write
security-events: write

env:
SW_APM_DEBUG_LEVEL: trace
AGENT_DOWNLOAD_URL: https://agent-binaries.global.st-ssp.solarwinds.com/apm/java/latest/solarwinds-apm-agent.jar
SW_APM_COLLECTOR: ${{ secrets.SW_APM_COLLECTOR }}
SW_APM_SERVICE_KEY_AO: ${{ secrets.SW_APM_SERVICE_KEY_AO }}
SW_APM_SERVICE_KEY: ${{ secrets.SW_APM_SERVICE_KEY }}
GITHUB_USERNAME: ${{ github.actor }}
SWO_LOGIN_URL: ${{ secrets.SWO_LOGIN_URL }}
SWO_HOST_URL: ${{ secrets.SWO_HOST_URL }}
SWO_EMAIL: ${{ secrets.SWO_EMAIL }}
SWO_PWORD: ${{ secrets.SWO_PWORD }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

jobs:
lambda-release-test:
runs-on: ubuntu-latest
env:
LAMBDA: "true"
OTEL_EXPORTER_OTLP_ENDPOINT: ${{ secrets.OTEL_EXPORTER_OTLP_ENDPOINT }}
steps:
- uses: actions/checkout@v6

- name: Free Disk Space before Build
run: |
echo "Disk space before pre-build cleanup:"
df -h
docker system prune -af
sudo rm -rf /usr/local/.ghcup
sudo rm -rf /opt/hostedtoolcache/CodeQL
sudo rm -rf /usr/local/lib/android/sdk/ndk
sudo rm -rf /usr/share/dotnet
sudo rm -rf /opt/ghc
sudo rm -rf /usr/local/share/boost
echo "Disk space after pre-build cleanup:"
df -h

- name: Set up JDK 17
uses: actions/setup-java@v5
with:
java-version: '17'
distribution: 'temurin'

- name: Set agent version
id: set_version
uses: ./.github/actions/version

- name: Set snapshot version
run: |
GIT_HASH=$(git rev-parse --short "$GITHUB_SHA")
echo "AGENT_VERSION=${{ steps.set_version.outputs.version }}.$GIT_HASH" >> $GITHUB_ENV

- name: Build smoke-test
run: |
cd smoke-tests
./gradlew build -x test

- name: Build webmvc jar
run: |
cd smoke-tests
./gradlew :spring-boot-webmvc:build

- name: Build webmvc image
run: |
cd smoke-tests/spring-boot-webmvc
docker image build --tag smt:webmvc .

- name: Docker login
run: echo "${{ secrets.GITHUB_TOKEN }}" | docker login ghcr.io -u $GITHUB_USERNAME --password-stdin

- name: Execute smoke tests
run: |
cd smoke-tests
./gradlew test --tests "com.solarwinds.LambdaTest" -Pno-reports

- name: Free Disk Space After Build
run: |
echo "Disk space before post-build cleanup:"
df -h
sudo rm -rf /usr/local/.ghcup
sudo rm -rf /opt/hostedtoolcache/CodeQL
sudo rm -rf /usr/local/lib/android/sdk/ndk
sudo rm -rf /usr/share/dotnet
sudo rm -rf /opt/ghc
sudo rm -rf /usr/local/share/boost
sudo rm -rf smoke-tests/build/
echo "Disk space after post-build cleanup:"
df -h

- name: Docker logout
if: always()
run: docker logout
112 changes: 15 additions & 97 deletions .github/workflows/push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ jobs:
s3://$STAGE_BUCKET/apm/java/$AGENT_VERSION/solarwinds-apm-agent-lambda.jar \
--acl public-read

aws s3 cp custom/shared/src/main/resources/solarwinds-apm-config.json \
aws s3 cp libs/shared/src/main/resources/solarwinds-apm-config.json \
s3://$STAGE_BUCKET/apm/java/$AGENT_VERSION/solarwinds-apm-config.json \
--acl public-read
env:
Expand Down Expand Up @@ -124,8 +124,6 @@ jobs:
platforms: linux/amd64
push: true
tags: "ghcr.io/${{github.repository_owner}}/xk6:latest"
cache-from: type=gha
cache-to: type=gha,mode=max

- name: Build rc image
uses: docker/build-push-action@v6
Expand All @@ -135,8 +133,6 @@ jobs:
platforms: linux/amd64
push: true
tags: "ghcr.io/${{github.repository_owner}}/petclinic:agent-rc"
cache-from: type=gha
cache-to: type=gha,mode=max

- name: Build stable image
uses: docker/build-push-action@v6
Expand All @@ -145,8 +141,6 @@ jobs:
platforms: linux/amd64
push: true
tags: "ghcr.io/${{github.repository_owner}}/petclinic:agent-latest"
cache-from: type=gha
cache-to: type=gha,mode=max

test:
runs-on: ubuntu-latest
Expand Down Expand Up @@ -192,91 +186,6 @@ jobs:
done
exit $lambda

lambda-release-test:
runs-on: ubuntu-latest
needs:
- s3-stage-upload
env:
LAMBDA: "true"
OTEL_EXPORTER_OTLP_ENDPOINT: ${{ secrets.OTEL_EXPORTER_OTLP_ENDPOINT }}
steps:
- uses: actions/checkout@v6

- name: Free Disk Space before Build
run: |
echo "Disk space before pre-build cleanup:"
df -h
sudo rm -rf /usr/local/.ghcup
sudo rm -rf /opt/hostedtoolcache/CodeQL
sudo rm -rf /usr/local/lib/android/sdk/ndk
sudo rm -rf /usr/share/dotnet
sudo rm -rf /opt/ghc
sudo rm -rf /usr/local/share/boost
echo "Disk space after pre-build cleanup:"
df -h

- name: Set up JDK 17
uses: actions/setup-java@v5
with:
java-version: '17'
distribution: 'temurin'

- name: Set agent version
id: set_version
uses: ./.github/actions/version

- name: Set snapshot version
run: |
GIT_HASH=$(git rev-parse --short "$GITHUB_SHA")
echo "AGENT_VERSION=${{ steps.set_version.outputs.version }}.$GIT_HASH" >> $GITHUB_ENV

- name: Build smoke-test
run: |
cd smoke-tests
./gradlew build -x test

- name: Build webmvc jar
run: |
cd smoke-tests
./gradlew :spring-boot-webmvc:build

- name: Build webmvc image
run: |
cd smoke-tests/spring-boot-webmvc
docker image build --tag smt:webmvc .

- name: Docker login
run: echo "${{ secrets.GITHUB_TOKEN }}" | docker login ghcr.io -u $GITHUB_USERNAME --password-stdin

- name: Execute smoke tests
run: |
cd smoke-tests
./gradlew test

- uses: actions/upload-artifact@v6
if: always()
with:
path: smoke-tests/build/reports/tests/test
name: lambda-release-test

- name: Free Disk Space After Build
run: |
echo "Disk space before post-build cleanup:"
df -h
sudo rm -rf /usr/local/.ghcup
sudo rm -rf /opt/hostedtoolcache/CodeQL
sudo rm -rf /usr/local/lib/android/sdk/ndk
sudo rm -rf /usr/share/dotnet
sudo rm -rf /opt/ghc
sudo rm -rf /usr/local/share/boost
sudo rm -rf smoke-tests/build/
echo "Disk space after post-build cleanup:"
df -h

- name: Docker logout
if: always()
run: docker logout

smoke-test-linux:
runs-on: ubuntu-latest
needs:
Expand Down Expand Up @@ -421,7 +330,7 @@ jobs:
- name: Execute smoke tests
run: |
cd smoke-tests
./gradlew test
./gradlew test --tests "com.solarwinds.SmokeTest"

- uses: actions/upload-artifact@v6
if: always()
Expand Down Expand Up @@ -506,7 +415,7 @@ jobs:
- name: Execute smoke tests
run: |
cd smoke-tests
./gradlew test
./gradlew test --tests "com.solarwinds.SmokeTestV2"

- uses: actions/upload-artifact@v6
if: always()
Expand Down Expand Up @@ -571,6 +480,8 @@ jobs:

maven_snapshot_release:
if: github.actor != 'dependabot[bot]'
needs:
- cache-prune
runs-on: ubuntu-latest
env:
SNAPSHOT_BUILD: true
Expand Down Expand Up @@ -650,8 +561,6 @@ jobs:
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
load: true
cache-from: type=gha
cache-to: type=gha,mode=max

- name: Login to Docker Hub
uses: docker/login-action@v3
Expand Down Expand Up @@ -687,4 +596,13 @@ jobs:
run: |
./gradlew build -x test
.github/scripts/detect-duplicate-classes.sh agent/build/libs/solarwinds-apm-agent.jar
.github/scripts/detect-duplicate-classes.sh agent-lambda/build/libs/solarwinds-apm-agent-lambda.jar
.github/scripts/detect-duplicate-classes.sh agent-lambda/build/libs/solarwinds-apm-agent-lambda.jar

cache-prune:
runs-on: ubuntu-latest
permissions:
actions: write
steps:
- uses: actions/checkout@v6
- name: clean gh cache
run: gh cache delete --all || true
4 changes: 2 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ jobs:
/tmp/version.txt \
/tmp/checksum.txt \
agent/build/libs/solarwinds-apm-agent.jar \
custom/shared/src/main/resources/solarwinds-apm-config.json
libs/shared/src/main/resources/solarwinds-apm-config.json

s3-prod-upload: # this job uploads the jar and default config json to prod s3
if: inputs.run_s3_upload
Expand Down Expand Up @@ -141,7 +141,7 @@ jobs:
s3://$PROD_BUCKET/apm/java/$AGENT_VERSION/solarwinds-apm-agent.jar \
--acl public-read

aws s3 cp custom/shared/src/main/resources/solarwinds-apm-config.json \
aws s3 cp libs/shared/src/main/resources/solarwinds-apm-config.json \
s3://$PROD_BUCKET/apm/java/$AGENT_VERSION/solarwinds-apm-config.json \
--acl public-read
env:
Expand Down
5 changes: 3 additions & 2 deletions agent-lambda/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ import com.github.jengelman.gradle.plugins.shadow.tasks.ShadowJar

plugins {
id("signing")
id("solarwinds.java-conventions")
id("solarwinds.shadow-conventions")
}

Expand All @@ -41,8 +42,8 @@ val upstreamAgent: Configuration by configurations.creating {
}

dependencies {
javaagentLibs(project(":custom:lambda"))
javaagentLibs(project(":custom:shared"))
javaagentLibs(project(":libs:lambda"))
javaagentLibs(project(":libs:shared"))
javaagentLibs(project(":instrumentation"))

bootstrapLibs(project(":bootstrap"))
Expand Down
3 changes: 2 additions & 1 deletion agent/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ import com.github.jengelman.gradle.plugins.shadow.tasks.ShadowJar

plugins {
id("signing")
id("solarwinds.java-conventions")
id("solarwinds.shadow-conventions")
}

Expand All @@ -42,7 +43,7 @@ val upstreamAgent: Configuration by configurations.creating {

dependencies {
javaagentLibs(project(":custom"))
javaagentLibs(project(":custom:shared"))
javaagentLibs(project(":libs:shared"))
javaagentLibs(project(":instrumentation"))

bootstrapLibs(project(":bootstrap"))
Expand Down
5 changes: 3 additions & 2 deletions benchmark/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,10 @@ repositories {

dependencies {
implementation(enforcedPlatform("org.junit:junit-bom:5.10.3"))
implementation(enforcedPlatform("org.testcontainers:testcontainers-bom:2.0.3"))

testImplementation("org.testcontainers:testcontainers:1.19.8")
testImplementation("org.testcontainers:postgresql:1.19.8")
testImplementation("org.testcontainers:testcontainers")
testImplementation("org.testcontainers:testcontainers-postgresql")
testImplementation("org.junit.jupiter:junit-jupiter-api")
testImplementation("org.junit.jupiter:junit-jupiter-params")
testImplementation("com.squareup.okhttp3:okhttp:4.12.0")
Expand Down
Loading
Loading