Getting Agent Logs

You can ask Contrast to log verbose information by passing a custom system property, -Dcontrast.log=/path/to/log.txt -Dcontrast.level=DEBUG -Dcontrast.log.daily=true to the server process.

These JVM options will put Contrast into debug mode and log all output to the log file specified as the system property value. It will also prevent the log from rolling over into multiple files. The log file will start with some messages that look similar to this:

These verbose logs will allow our support team to diagnose any issues you may encounter. Please submit diagnostic logs when filing a bug report.

Behavior with Other Agents

Running APM Agents with Contrast Agents

Many customers run multiple agent-based technologies, such as Application Performance Management (APM) technologies, in parallel with the Contrast Java and .NET agents. Contrast has performed testing of various, known APM agents in parallel with the Contrast agents. If a particular APM vendor or alternative agent vendor isn't included in the list, use the Support widget in OpenDocs to send a message to Contrast's Customer Support team.

Compatible Java Agents

Agent Status
AppDynamics Many versions tested without issue.
New Relic Tested daily by Contrast.
YourKit Tested daily by Contrast.
CA Wily Newer versions tested without issue.
JaCoCo Tested regularly by Contrast, but must be specified as the first -javaagent.
DynaTrace Newer versions tested without issue.

Note: There have been rare instances of compatibility issues with very old versions of DynaTrace, Wily and JavaMelody.

Tomcat Security Policy

Some Java applications define custom permissions enforced via the catalina.policy file in $CATALINA_BASE/conf/catalina.policy. When applications run with this Java security policy, the Contrast Java agent requires an additional grant of permission to the agent JAR file. Without this permission, the application will either fail to instrument, or potentially fail to execute correctly. For more information about the catalina.policy please read this.

The Contrast Java Agent reads files when analyzing runtime code and reading cached data. The agent writes files when saving analysis results and log files. The agent also inspects sensitive data, like ClassLoaders and ProtectionDomains. In addition, the contrast agent automatically updates and may cause problems when new permissions are required. In order to do all of these operations and more, the agent requires a permission grant within the catalina.policy.

In this scenario it is suggested that the agent be given the ubiquitous "AllPermission". Update the path in this example to the real file path to the contrast.jar agent file.

grant codeBase "file:/path/to/contrast.jar" {
  permission java.security.AllPermission;
};