TongWeb¶
Installation & Configuration¶
Download ddtrace¶
Download ddtrace agent
Configure Agent¶
Navigate to the bin directory and edit the external.vmoptions file, adding the following variables under server_options:
......
#server_options
......
-javaagent:/home/lr/agent/dd-java-agent-ext.jar
-Ddd.tags=component:tongweb,env:dev
-Ddd.jmxfetch.enabled=true
-Ddd.jmxfetch.statsd.host=localhost
-Ddd.jmxfetch.statsd.port=8125
-Ddd.jmxfetch.tomcat.enabled=true
#debug
......
Adjust the dd-java-agent version as needed. It is not recommended to add the variable -Ddd.service.name, as doing so would cause all projects to use the same serviceName.
Enable Statsd Collector in DataKit¶
The Statsd collector is used to collect metric-related information. Enter the datakit/conf.d/samples directory and copy statsd.conf.sample to statsd.conf.
root:/usr/local/datakit/conf.d/statsd$ ll
total 16
drwxr-xr-x  2 root root 4096 10月  9 08:32 ./
drwxr-xr-x 53 root root 4096 10月  9 08:32 ../
-rwxr-xr-x  1 root root 2233  7月 24 16:38 statsd.conf
-rwxr-xr-x  1 root root 2233 10月  9 08:32 statsd.conf.sample
For further parameter adjustments, refer to the Statsd collector integration documentation.
Enable ddtrace Collector in DataKit¶
The ddtrace collector is used to collect ddtrace trace-related information. Enter the datakit/conf.d/samples directory and copy ddtrace.conf.sample to ddtrace.conf.
root:/usr/local/datakit/conf.d/ddtrace$ ll
total 16
drwxr-xr-x  2 root root 4096 10月  9 08:32 ./
drwxr-xr-x 53 root root 4096 10月  9 08:32 ../
-rwxr-xr-x  1 root root 2470  8月 16 10:42 ddtrace.conf
-rwxr-xr-x  1 root root 2474 10月  9 08:32 ddtrace.conf.sample
For further parameter adjustments, refer to the ddtrace collector integration documentation.
Restart DataKit¶
Restart TongWeb¶
Metrics¶
Global Tags
| Tag | Description | 
|---|---|
| component | Component name: tongweb | 
| env | Environment: env | 
JVM metrics reference JVM Metrics