Skip to content

JVM (StatsD)


Configuration

Description: Example of collecting JVM Metrics through ddtrace, with DataKit's built-in Statsd receiving the JVM Metrics sent by ddtrace.

Enable DataKit Collector

  • Enable Statsd collector

Copy the sample file; no need to modify statsd.conf

cd /usr/local/datakit/conf.d/statsd
cp statsd.conf.sample statsd.conf
  • Restart DataKit
systemctl restart datakit

Application Configuration

  • Adjust startup parameters
-javaagent:/usr/local/datakit/data/dd-java-agent.jar \
 -Ddd.service.name=<your-service>   \
 -Ddd.env=dev  \
 -Ddd.agent.port=9529  

Use java -jar to start the jar, which by default connects to the local DataKit. If you need to connect to a remote server's DataKit, use -Ddd.agent.host and -Ddd.jmxfetch.statsd.host to specify the ip.

For more detailed integration with DDTrace, refer to the ddtrace-java documentation.

Feedback

Is this page helpful? ×