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
Statsdcollector
Copy the sample file; no need to modify statsd.conf
- 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.