Connect to Scala



SBT / Scala commands

You can add TakipiAgents to your Scala application by passing a JVM argument to scala/sbt with a "-J" prefix:scala -J-agentlib:TakipiAgentsbt -J-agentlib:TakipiAgentYou can also add TakipiAgents to your Scala application by setting JAVA_OPTS environment variable before starting Scala: Linux / macOS:export JAVA_OPTS="$JAVA_OPTS -agentlib:TakipiAgent"Windows:set JAVA_OPTS=%JAVA_OPTS% -agentlib:TakipiAgentNote: 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:

Linux / macOS:

export MAVEN_OPTS="$MAVEN_OPTS -agentlib:TakipiAgent"

Windows:

set MAVEN_OPTS=%MAVEN_OPTS% -agentlib:TakipiAgent

Play 2.2+ - Production mode

  • Locate the run script of your play application.It will generally be at {app_folder}/bin/{app_name}
  • Locate the line: declare -a java_args
  • Add the following immediately after it:java_args=( "${java_args[@]}" "-agentlib:TakipiAgent" )
  • Restart the application.
  • Test the installation - head back to app.overops.com and click .
    If the connecting process was successful, you will get a "Monitoring" message next to your JVM.
  • Throw an exception, or make sure your application throws exceptions.

Play 2.2+ - Debug mode (Linux / macOS)

  • Locate build under {play dir}/bin.
  • Add the following line just before the java execution linePLAY_OPTS="$PLAY_OPTS -agentlib:TakipiAgent"
  • Run play in debug mode - play run
  • Test the installation - head back to app.overops.com and click .
    If the connecting process was successful, you will get a "Monitoring" message next to your JVM.
  • Throw an exception, or make sure your application throws exceptions.

Play 2.2+ - Debug mode (Windows)

  • Locate build.bat under {play dir}\bin.
  • Add the following line just before the java execution lineset PLAY_OPTS=%PLAY_OPTS% -agentlib:TakipiAgent
  • Run play in debug mode - play run
  • Test the installation - head back to app.overops.com and click .
    If the connecting process was successful, you will get a "Monitoring" message next to your JVM.
  • Throw an exception, or make sure your application throws exceptions.

Play 2.0+ - Debug mode (Linux / macOS)

  • Locate build under {play dir}/bin.
  • Add the following line just before the java execution lineJAVA_OPTS="$JAVA_OPTS -agentlib:TakipiAgent"
  • Run play in debug mode - play run
  • Test the installation - head back to app.overops.com and click .
    If the connecting process was successful, you will get a "Monitoring" message next to your JVM.
  • Throw an exception, or make sure your application throws exceptions.

Play 2.0+ - Debug mode (Windows)

  • Locate build.bat under {play dir}\bin.
  • Add the following line just before the java execution line
    set JAVA_OPTS=%JAVA_OPTS% -agentlib:TakipiAgent
  • Run play in debug mode - play run
  • Test the installation - head back to app.overops.com and click .
    If the connecting process was successful, you will get a "Monitoring" message next to your JVM.
  • Throw an exception, or make sure your application throws exceptions.
Have more questions? Submit a request