Scala
Attaching the OverOps Agent to a JVM Running Java 10 or 11
When attaching an OverOps Agent to a JVM that is running Java 10 or 11 or any IBM java versions, follow these guidelines:
Turn off Class Sharing: This can be done using the following flags:
for IBM Java
‑Xshareclasses:none
for HotSpot
-Xshare:off
-XX:-UseTypeSpeculation
Increase ReservedCodeCache to at least 512mb by adding the following flag
-XX:ReservedCodeCacheSize=512m
The Agent should appear last in the VM arguments list before specifying the main class or jar.
When adding/removing 3rd party packages, the Agent should be restarted.
Additionally, if you wish to upgrade your own compiler to target Java 10/11, then you'll have to upgrade your Collector (SaaS) or Collector + backend (On-Premises) to support it.
Rootless Agent Installation Method (Linux only)
When Using the Rootless Agent Installation Method replace the
-agentlib:TakipiAgent
JVM startup Argument
with
-agentpath:<TAKIPI_HOME>/lib/libTakipiAgent.so
JVM startup Argument
SBT/Scala commands
You can add TakipiAgents to your Scala application by passing a JVM argument to scala/sbt with a "-D" prefix:
scala -D-agentlib:TakipiAgent
sbt -D-agentlib:TakipiAgent
or respectively
scala -D-agentpath:<TAKIPI_HOME>/lib/libTakipiAgent.dll
sbt -D-agentpath:<TAKIPI_HOME>/lib/libTakipiAgent.dll
Add TakipiAgents to your Scala application by setting JAVA_OPTS environment variable before starting Scala:
export JAVA_OPTS="$JAVA_OPTS -agentlib:TakipiAgent"
set JAVA_OPTS=%JAVA_OPTS% -agentlib:TakipiAgent
In some sbt versions the environment variable is SBT_OPTS and not JAVA_OPTS.
Maven
In the terminal/command line, add -agentlib:TakipiAgent
to the MAVEN_OPTS environment variable:
export MAVEN_OPTS="$MAVEN_OPTS -agentlib:TakipiAgent"
set MAVEN_OPTS=%MAVEN_OPTS% -agentlib:TakipiAgent
Test your Installation
Updated almost 5 years ago