Scala
Traces | Metrics | App Logs | Custom Logs | Profiling |
---|---|---|---|---|
✅ | ✅ | ✅ | ✅ | ✅ |
This guide walks you through setting up Application Performance Monitoring (APM) on a Scala application. These instructions can also be found on the Installation page in your Middleware Account. View demo code here.
Prerequisites
Scala version 2.11.6
or above. Check your Scala version with the following command:
scala -version
Install
Step 1: Download Jar File
Download the most recent Middleware Java Agent jar file.
Step 2: Update Your build.sbt
File
lazy val root = (project in file(".")) .settings( ... (run / javaOptions) ++= Seq( "-javaagent:middleware-javaagent-{VERSION}.jar", "-Dotel.service.name={SCALA-APP-NAME}" ) ... )
Step 3: Run Your App
Run the following command in your terminal to start your application
MW_API_KEY="<MW_API_KEY>" sbt run
Continuous Profiling
Continuous profiling captures real-time performance insights from your application to enable rapid identification of resource allocation, bottlenecks, and more. Navigate to the Continuous Profiling section to learn more about using Continuous Profiling with the Ruby APM.
Need assistance or want to learn more about Middleware? Contact our support team in Slack.