Pull requests for bug fixes are always welcome!
Before submitting new features or changes to current functionality, it is recommended to first open an issue and discuss your ideas or propose the changes you wish to make.
In order to build and test this whole repository you need JDK 17.
Build using Java 17:
java -version./gradlew assembleand then you can find the java agent artifact at
agent/agent/build/libs/applicationinsights-agent-<version>.jar.
When updating dependencies in the project, you need to regenerate the dependency lock files and license reports.
After updating dependencies in any build.gradle.kts file, regenerate the lock files:
./gradlew resolveAndLockAll --write-locksThis will update all gradle.lockfile files throughout the project to reflect the new dependency versions.
After updating dependencies, regenerate the license report to include licenses for new dependencies:
./gradlew generateLicenseReport --no-build-cacheThis ensures all third-party licenses are properly documented.
See IntelliJ setup and troubleshooting from the OpenTelemetry Java Instrumentation project.
See the style guide. from the OpenTelemetry Java Instrumentation project.
Pick the smoke test that you want to run, e.g. MongoTest.
If the smoke test is abstract, then pick one of its subclasses, e.g. MongoTest$Tomcat8Java8Test.
Right-click on it and select run.
Add -PsmokeTestRemoteDebug=true to the gradle args, e.g.
Then create a Remote JVM Debug configuration, e.g.
Then run (not debug) the smoke test as above in Running the smoke tests from Intellij.
The JVM inside the container will wait remote debugger to be attached before starting.
Then go to Run > Debug, and select your Remote JVM Debug configuration.
While developing, if you find errorprone is getting in your way (e.g. it won't let you add
System.out.println to your code), you can disable it by adding the following to your
~/.gradle/gradle.properties:
disableErrorProne=true

