An open API service indexing awesome lists of open source software.

https://github.com/navercloudplatform/cloudinsight-application-repository

Cloud Insight Application Maven Repository
https://github.com/navercloudplatform/cloudinsight-application-repository

Last synced: 3 months ago
JSON representation

Cloud Insight Application Maven Repository

Awesome Lists containing this project

README

        

# Cloud Insight Application Monitoring: Spring Boot
Micrometer Registry for Cloud Insight

## Index
[1. Supported Environments](#1.-Supported-Environments)
[2. Usage](#2.-Usage)
[3. Appendix](#3.-Appendix)
[4. More Information](#4.-More-Information)
[5. Release Notes](#5.-Release-Notes)

## 1. Supported Environments
- **JDK 8 ↑**
- **Spring Boot 2.0.4 ↑**

## 2. Usage

#### :heavy_check_mark: Add a repository in your spring boot application
- `pom.xml`
- env: **local**
```xml

ncp-cloudinsight-application-release
https://raw.githubusercontent.com/NaverCloudPlatform/CloudInsight-Application-Repository/main/releases/

```
- env: **ncp server**
```xml

ncp-cloudinsight-application-release
https://nsight.ncloud.com/application/releases/

```
- `build gradle`
- env: **local**
```gradle
maven { url "https://raw.githubusercontent.com/NaverCloudPlatform/CloudInsight-Application-Repository/main/releases/" }
```
- env: **ncp server**
```gradle
maven { url "https://nsight.ncloud.com/application/releases/" }
```
#### :heavy_check_mark: Import a dependency in your spring boot application
- `pom.xml`
```xml

com.ncp.cloudinsight
spring-boot-metrics-cloudinsight-autoconfigure
1.0.0

```
- `build.gradle`
```gradle
implementation 'com.ncp.cloudinsight:spring-boot-metrics-cloudinsight-autoconfigure:1.0.0'
```

#### :heavy_check_mark: Add some properties in your application config
- `.properties`
```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`
```yaml
management:
metrics:
export:
cloudinsight:
uri: http://cnx-collector.nsight.ncloud.com:9973
id: ${application key}
enabled: true
```

## 3. Appendix
- **add custom metrics**
```java
Counter counter = Counter.builder("custom.counter.metric")
.tag("K1", "V1")
.description("custom counter metric description")
.register(registry);
counter.increment(10);
```
- **filter metrics**
```java
registry.config()
.meterFilter(MeterFilter.ignoreTags("too.much.information"))
.meterFilter(MeterFilter.denyNameStartsWith("jvm"));
```
- **add common tags to every metric**
- `.properties`
```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`
```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")
));
```
## 4. More Information
- [NAVER CLOUD PLATFORM > Cloud Insight](https://guide.ncloud-docs.com/docs/cloudinsight-cloudinsightoverview)
- [Micrometer Docs](https://micrometer.io/docs/concepts)

## 5. Release Notes
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
```