Skip to content

Conversation

@cleverchuk
Copy link
Contributor

Summary

This PR refactors the project's module structure to better align with the upstream OpenTelemetry Java Instrumentation project layout. The changes reorganize instrumentation modules, move custom library modules to a dedicated libs/ directory, and streamline CI/CD workflows.

Changes

🏗️ Module Structure Refactoring

Instrumentation Modules Reorganization

  • Moved instrumentation modules to follow upstream's javaagent/ subdirectory pattern:
    • instrumentation/jdbc/instrumentation/jdbc/javaagent/
    • instrumentation/spring-webmvc/spring-webmvc-3.1/instrumentation/spring-webmvc/spring-webmvc-3.1/javaagent/
    • instrumentation/spring-webmvc/spring-webmvc-6/instrumentation/spring-webmvc/spring-webmvc-6/javaagent/
    • instrumentation/hibernate/hibernate-4.0/instrumentation/hibernate/hibernate-4.0/javaagent/
    • instrumentation/hibernate/hibernate-6.0/instrumentation/hibernate/hibernate-6.0/javaagent/

Library Modules Migration

  • Refactored custom:lambdalibs:lambda
  • Refactored custom:sharedlibs:shared

This creates a cleaner separation between:

  • custom/ - Custom SolarWinds configurations and extensions
  • libs/ - Reusable library modules (shared code between agent and agent-lambda)

📦 Dependency Updates

  • Testcontainers: Upgraded from 1.19.8 to 2.0.3 using BOM-based dependency management
    • benchmark/build.gradle.kts: Switched to testcontainers-bom:2.0.3
    • smoke-tests/build.gradle: Updated testcontainers version

🔧 Build Configuration Updates

  • Updated settings.gradle.kts with new module paths
  • Updated build scripts across modules to reference new module locations:
    • agent/build.gradle.kts
    • agent-lambda/build.gradle.kts
    • custom/build.gradle.kts
    • testing/agent-for-testing/build.gradle.kts
    • testing/agent-test-extension/build.gradle.kts
  • Added Java toolchain configuration to bootstrap/build.gradle.kts
  • Enhanced solarwinds.instrumentation-conventions.gradle.kts with additional configuration

🧹 CI/CD Cleanup

GitHub Actions Workflow (push.yml)

  • Updated file paths to use new libs/shared location for S3 uploads
  • Removed Docker build caching configuration (cache-from/cache-to for GHA cache)
  • Removed artifact upload step for lambda release tests
  • Cleaned up redundant workflow configurations

CircleCI & Release Workflow

  • Updated .circleci/config.yml with corrected module references
  • Updated .github/workflows/release.yml with new module paths
  • Updated .github/copilot-instructions.md to reflect new module structure

🧪 Test Cleanup

  • Removed verbose test container loggers from smoke tests:
    • LambdaTest.java
    • SmokeTest.java
    • SmokeTestV2.java
    • K6Container.java
    • SpringBootWebMvcContainer.java

Files Changed

  • 163 files changed (primarily file relocations)
  • 83 insertions(+), 62 deletions(-)

Breaking Changes

⚠️ Module Path Changes: Any external references to the old module paths will need to be updated:

Old Path New Path
custom:lambda libs:lambda
custom:shared libs:shared
instrumentation:jdbc instrumentation:jdbc:javaagent
instrumentation:spring-webmvc:spring-webmvc-3.1 instrumentation:spring-webmvc:spring-webmvc-3.1:javaagent
instrumentation:spring-webmvc:spring-webmvc-6 instrumentation:spring-webmvc:spring-webmvc-6:javaagent
instrumentation:hibernate:hibernate-4.0 instrumentation:hibernate:hibernate-4.0:javaagent
instrumentation:hibernate:hibernate-6.0 instrumentation:hibernate:hibernate-6.0:javaagent

Testing

  • All existing tests pass
  • Build completes successfully
  • Smoke tests pass with new module structure
  • Agent JAR builds correctly

Test services data

  1. e-1712644058766987264
  2. e-1712643928659124224
  3. e-1742334541200846848
  4. e-1777406072376840192

@cleverchuk cleverchuk requested a review from a team as a code owner January 12, 2026 19:03
@cleverchuk cleverchuk requested a review from Copilot January 12, 2026 19:04
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR refactors the module structure to better align with the upstream OpenTelemetry Java Instrumentation project layout. The changes reorganize instrumentation modules into javaagent/ subdirectories and move custom library modules from custom/ to a dedicated libs/ directory, creating a cleaner separation between configurations/extensions and reusable library code.

Changes:

  • Reorganized instrumentation modules to follow upstream's javaagent/ subdirectory pattern (e.g., instrumentation/jdbc/instrumentation/jdbc/javaagent/)
  • Migrated library modules from custom:lambda and custom:shared to libs:lambda and libs:shared
  • Updated Testcontainers from 1.19.8/1.20.4/2.0.2 to 2.0.3 with BOM-based dependency management
  • Removed verbose test container loggers from smoke tests
  • Updated CI/CD workflows to reference new module paths and removed Docker build caching configuration

Reviewed changes

Copilot reviewed 25 out of 163 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
settings.gradle.kts Updated module paths to reflect new libs/ directory and javaagent/ subdirectory structure
agent/build.gradle.kts Updated dependency references to use libs:shared instead of custom:shared
agent-lambda/build.gradle.kts Updated dependency references to use libs:lambda and libs:shared
custom/build.gradle.kts Updated dependency references to use libs:shared
libs/shared/build.gradle.kts Added solarwinds.java-conventions plugin to relocated library module
libs/lambda/build.gradle.kts Added solarwinds.java-conventions plugin and updated dependency references
bootstrap/build.gradle.kts Added solarwinds.java-conventions plugin for Java toolchain configuration
instrumentation/build.gradle.kts Added solarwinds.java-conventions plugin
testing/agent-for-testing/build.gradle.kts Added solarwinds.java-conventions plugin and updated to reference libs:shared
testing/agent-test-extension/build.gradle.kts Updated dependency reference to use libs:shared
buildSrc/src/main/kotlin/solarwinds.java-conventions.gradle.kts Added solarwinds.spotless-conventions plugin
buildSrc/src/main/kotlin/solarwinds.instrumentation-conventions.gradle.kts Enhanced to support javaagent/ subdirectory naming pattern with computeInstrumentationName() function
instrumentation/jdbc/javaagent/build.gradle.kts Updated Testcontainers to 2.0.3, updated MySQL connector, and added compiler configuration to remove -Werror
instrumentation/jdbc/javaagent/src/test/java/.../JdbcInstrumentationTest.java Added DockerImageName.parse() for MySQL container initialization and @SuppressWarnings("all") annotation
benchmark/build.gradle.kts Migrated to Testcontainers BOM 2.0.3
smoke-tests/build.gradle Updated Testcontainers version to 2.0.3
smoke-tests/src/test/java/.../SpringBootWebMvcContainer.java Removed verbose log consumer
smoke-tests/src/test/java/.../K6Container.java Removed verbose log consumer and logger field
smoke-tests/src/test/java/.../SmokeTest.java Removed verbose log consumer
smoke-tests/src/test/java/.../SmokeTestV2.java Removed verbose log consumer
smoke-tests/src/test/java/.../LambdaTest.java Removed verbose log consumer
.github/workflows/push.yml Updated S3 upload paths to reference libs/shared and removed Docker build caching
.github/workflows/release.yml Updated S3 upload paths to reference libs/shared
.circleci/config.yml Updated file paths to reference libs/shared
.github/copilot-instructions.md Updated module structure documentation to reflect new libs/ directory

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants