Skip to content

pjfanning/micrometer-akka-dynatrace

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

micrometer-akka-dynatrace

This sample demonstrates how to add Micrometer-Akka metrics to your application.

Micrometer Metrics compares itself to SLF4J, but for metrics.

All you need to do is add a dependency on the micrometer-akka jar, add some configuration to your application.conf and to enable aspectjweaver.

The application.conf requires your dynatrace configs (API key and URI).

This sample uses micrometer-registry-dynatrace to have the metrics pushed to Dynatrace. This is setup in Main.scala.

sbt clean run

This sample uses sbt-javaagent to enable aspectjweaver. This plugin basically adds this to the java runtime command.

-javaagent:/path/to/aspectjweaver-1.9.2.jar

If you want to use micrometer-akka with your own application, ensure that you startup script adds something like this:

JAVA_AGENT="-javaagent:$BASE/lib/aspectjweaver-1.9.2.jar"
$JAVA_HOME/bin/java $JAVA_AGENT -cp $CP $JVM_OPTS $CLASS_NAME

To query the hello endpoint, use:

curl http://localhost:12345/hello

The metrics are simple akka metrics and calling the hello endpoint generates some traffic to monitor.

About

Sample showing how to use micrometer-akka with dynatrace

Topics

Resources

License

Security policy

Stars

Watchers

Forks

Releases

No releases published

Sponsor this project

 

Packages

No packages published

Languages