Mixed Telemetry versions

Availability

Available since Cinnamon 2.16.0

By default, Lightbend Telemetry does not support running multiple different versions of its dependencies within the same application.

As of version 2.16.0, doing so will cause the JVM to exit with an error message similar to:

[ERROR] [01/26/2021 10:12:26.363] [main-1] [Cinnamon] !! Having multiple different versions of Telemetry dependencies on your classpath is not supported, detected Telemetry modules: [cinnamon-chmetrics: 2.15.0, cinnamon-core: 2.16.0, cinnamon-java: 2.16.0, cinnamon-common: 2.16.0, cinnamon-akka: 2.16.0, cinnamon-scala: 2.16.0, cinnamon-core-java: 2.16.0, cinnamon-agent-build: 2.16.0]. The JVM will now shut down unless you want to explicitly enable this behaviour.

The list of Telemetry dependencies is sorted by version (ascending) to make it easier to identify the incorrect version(s).

Forcing mixed dependency versions

Advanced users can override this behaviour and explicitly permit dependency version mixing by passing the mix=true parameter to the Lightbend Telemetry agent, described in the below sections.

sbt

You can specify the cinnamonArguments sbt setting to provide mix=true to your Telemetry agent:

cinnamonArguments := "mix=true"

Maven

Under maven, you can modify the <argument> tag that loads the Telemetry agent:

<argument>-javaagent:${project.build.directory}/dependency/cinnamon-agent.jar=mix=true</argument>

Gradle

Under gradle you can modify the jvmArgs attribute that loads the Telemetry agent:

jvmArgs "-javaagent:${configurations.agent.singleFile}=mix=true"