Why can't I see Cinnamon metrics when running my Play application in development?
A common cause for Cinnamon metrics not being reported in Play development is because Cinnamon does not currently support Play’s development mode*, which is the mode used by the Play server when started using the sbt run command. As a workaround, start your Play server using the sbt runProd command instead(sbt testProd for Play 2.5.x or older).However, this is only recommended for when there is a need to see Cinnamon metrics while running a Play application locally. For all other scenarios, the sbt run command should be used. This is because Play's development mode offers many benefits including auto reloading, easy to read in-browser compilation errors and triggered execution.For more information on getting started with Cinnamon & Play please see https://developer.lightbend.com/docs/cinnamon/latest/getting-started/play.html*Why the LimitationIn order to instrument the code correctly, Cinnamon requires a forked Java Virtual Machine (JVM), which means a completely separate JVM is run as a different process in the operating system. Play’s development mode always runs in-process, which is what prevents Cinnamon metrics from being output.
Related Articles
How to monitor my Play application? Can I use Cinnamon?
Yes! Starting in version 2.7 Cinnamon added support for monitoring Play 2.6+ applications. For more information, you can check out the announcement here.
Play Performance Tuning
General performance tuning advice Run experiments to tune your application. It’s not reliable to rely on assumptions. To tune your application you need to be systematic. Make hypotheses, control variables and test, test, test! It can be a good idea ...
Why should I use Telemetry (Cinnamon) instead of Kamon?
Telemetry (aka Cinnamon) is the industry’s most capable tool for the monitoring of Akka, Play and Lagom applications. While Cinnamon and Kamon share some common features such as actor mailbox metrics, dead letter message counts and fine-grained ...
What are the units for Cinnamon rates?
The units will actually depend on the metric backend used. Rate is a general interface that just has a mark method. For the Coda Hale Metrics backend, the custom metrics Rate is backed by a Meter. Meters record rates in events per second. These ...
ThreadLocal in Play
Developers with Java experience may have previously used ThreadLocal to store/read data isolated to a specific system user or user request. One common example is working with legacy servlet containers when each user request was allocated a single ...