Skip to content

Installing and using Lightrun with Scala

Prerequisites

Before running the app with the agent, make sure you have downloaded the Java agent.

Using the Lightrun agent

Run your application with the following command:

java -agentpath:</path-to-agent>/lightrun_agent.so -cp <path-to-scala>/scala-library.jar:<path-to-jar> <your-main-class>
  • <path-to-agent> - The absolute path to the agent's folder (~/ will not work)
  • <path-to-scala> - The absolute path to the Scala installation directory
  • <path-to-jar> - The absolute path to the Scala application to be run with the agent
  • <your-main-class> - The application main class to be run

Optional

You can also automatically attach an agent to your launched Java processes with the JAVA_OPTS environment variable.

JAVA_OPTS=-agentpath:<path-to-agent>/lightrun_agent.so

Notice

Scala expressions are limited:

  • Expressions should be converted to their equivalent Java syntax.

Last update: May 29, 2023