Skip to content

Latest commit

 

History

History
69 lines (42 loc) · 2.13 KB

CONTRIBUTING.md

File metadata and controls

69 lines (42 loc) · 2.13 KB

Contributing

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.

Building

In order to build and test this whole repository you need JDK 11+.

Building from source

Build using Java 11+:

java -version
./gradlew assemble

and then you can find the java agent artifact at

agent/agent/build/libs/applicationinsights-agent-<version>.jar.

IntelliJ setup and troubleshooting

See IntelliJ setup and troubleshooting from the OpenTelemetry Java Instrumentation project.

Style guide

See the style guide. from the OpenTelemetry Java Instrumentation project.

Running a smoke test in Intellij

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.

Debugging a smoke test in Intellij

Add -PsmokeTestRemoteDebug=true to the gradle args, e.g.

Update smoke test configuration

Then create a Remote JVM Debug configuration, e.g.

Create a Remote JVM Debug configuration

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.

Error prone

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