Add readme of azure-spring-boot-metrics-starter. (#760)

* Add readme of azure-spring-boot-metrics-starter.

* Update README.md

* Update README.md
This commit is contained in:
Zhou Liu 2019-11-04 20:28:31 +08:00 коммит произвёл GitHub
Родитель a22d547dc9
Коммит 49cc28ff4a
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 4AEE18F83AFDEB23
1 изменённых файлов: 37 добавлений и 0 удалений

Просмотреть файл

@ -0,0 +1,37 @@
## Usage
### Add the dependency
`azure-spring-boot-metrics-starter` is published on Maven Central Repository.
If you are using Maven, add the following dependency.
```xml
<dependency>
<groupId>com.microsoft.azure</groupId>
<artifactId>azure-spring-boot-metrics-starter</artifactId>
<version>2.2.0</version>
</dependency>
```
### Add the property setting
Open `application.properties` file and add below properties with your instrumentation key.
```
management.metrics.export.azuremonitor.instrumentation-key=<your-instrumentation-key-here>
```
### Trouble Shooting
1. If the JDK version you use is greater than 1.8, You may meet this problem:
```
NoClassDefFoundError: javax/xml/bind/JAXBException
```
To solve this issue, you need to add the dependency below into your classpath:
```
<dependency>
<groupId>javax.xml.bind</groupId>
<artifactId>jaxb-api</artifactId>
<version>2.3.0</version>
</dependency>
```