Last active
January 22, 2020 10:04
-
-
Save qyf404/dae4836dc980157c0cec461560f5866f to your computer and use it in GitHub Desktop.
Revisions
-
qyf404 revised this gist
Jan 22, 2020 . 1 changed file with 2 additions and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -4,5 +4,6 @@ @Bean public MeterRegistryCustomizer<MeterRegistry> metricsCommonTags(RcConfig rcConfig) { return registry -> registry.config() .commonTags("appname", "myapp", "nodename", "007"); } -
qyf404 created this gist
Jan 22, 2020 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,8 @@ /** * 这是个可选项, 用来添加一些自定义tag */ @Bean public MeterRegistryCustomizer<MeterRegistry> metricsCommonTags(RcConfig rcConfig) { return registry -> registry.config() .commonTags("appname:myapp", "nodename:007"); } This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,7 @@ management: metrics.export.datadog: apiKey: ${your_datadog_key} enabled: true hostTag: ${your_host_name} step: 10s This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,16 @@ <parent> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-parent</artifactId> <version>2.2.2.RELEASE</version> <relativePath/> <!-- lookup parent from repository --> </parent> <dependencies> <dependency> <groupId>io.micrometer</groupId> <artifactId>micrometer-registry-datadog</artifactId> </dependency> <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-actuator</artifactId> </dependency> </dependencies>