Micrometer Registry for Cloud Insight
1. Supported Environments
2. Usage
3. Appendix
4. More Information
5. Release Notes
- JDK 8 ↑
- Spring Boot 2.0.4 ↑
pom.xml
- env: local
<repository> <id>ncp-cloudinsight-application-release</id> <url>https://raw.githubusercontent.com/NaverCloudPlatform/CloudInsight-Application-Repository/main/releases/</url> </repository>
- env: ncp server
<repository> <id>ncp-cloudinsight-application-release</id> <url>https://nsight.ncloud.com/application/releases/</url> </repository>
- env: local
build gradle
- env: local
maven { url "https://raw.githubusercontent.com/NaverCloudPlatform/CloudInsight-Application-Repository/main/releases/" }
- env: ncp server
maven { url "https://nsight.ncloud.com/application/releases/" }
- env: local
pom.xml
<dependency>
<groupId>com.ncp.cloudinsight</groupId>
<artifactId>spring-boot-metrics-cloudinsight-autoconfigure</artifactId>
<version>1.0.0</version>
</dependency>
build.gradle
implementation 'com.ncp.cloudinsight:spring-boot-metrics-cloudinsight-autoconfigure:1.0.0'
.properties
# Cloud Insight's Collector URI
management.metrics.export.cloudinsight.uri=http://cnx-collector.nsight.ncloud.com:9973
# The application key issued from Cloud Insight
management.metrics.export.cloudinsight.id=${application key}
# true if you want to publish metrics to Cloud Insight. Default is true.
management.metrics.export.cloudinsight.enabled=true
.yml
management:
metrics:
export:
cloudinsight:
uri: http://cnx-collector.nsight.ncloud.com:9973
id: ${application key}
enabled: true
- add custom metrics
Counter counter = Counter.builder("custom.counter.metric") .tag("K1", "V1") .description("custom counter metric description") .register(registry); counter.increment(10);
- filter metrics
registry.config() .meterFilter(MeterFilter.ignoreTags("too.much.information")) .meterFilter(MeterFilter.denyNameStartsWith("jvm"));
- add common tags to every metric
.properties
# add common tags to every metric reported to the Cloud Insight management.metrics.export.cloudinsight.tags.common-tag-key1=common-tag-val1 management.metrics.export.cloudinsight.tags.common-tag-key2=common-tag-val2
.java
// add common tags to every metric reported to the Cloud Insight registry.config().commonTags(Arrays.asList( Tag.of("common-tag-key1", "common-tag-val1"), Tag.of("common-tag-key2", "common-tag-val2") ));
version | date | changes |
---|---|---|
v 1.0.0 | 2023.11.23 | first release |
spring-boot-metrics-cloudinsight-autoconfigure
Copyright (c) 2023-present NAVER Cloud Corp.
Apache-2.0