1、下载DatadogAgent:
File1:https://s3.amazonaws.com/ddagent-windows-stable/datadog-agent-7-latest.amd64.msi
File2:https://dtdg.co/latest-java-tracer
2、安装完之后,会有这个路径:C:\ProgramData\Datadog\conf.d,在这个路径下新建 java.d文件夹,建文件 conf.yaml
内容为:
#Log section
logs:
# - type : file (mandatory) type of log input source (tcp / udp / file)
# port / path : (mandatory) Set port if type is tcp or udp. Set path if type is file
# service : (mandatory) name of the service owning the log
# source : (mandatory) attribute that defines which integration is sending the log
# sourcecategory : (optional) Multiple value attribute. Can be used to refine the source attribute
# tags: (optional) add tags to each log collected
- type: file
path: c:/log/inv-api-price.log
service: demo-logback
source: java
sourcecategory: sourcecode
3、将下载的第二个jar包 放到 一个目录下