Skip to content

Commit

Permalink
docs: update doc to include configuration step required to setup bundle
Browse files Browse the repository at this point in the history
  • Loading branch information
MaksymDolgykh committed Dec 14, 2022
1 parent cbb1f93 commit 21380c0
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,27 @@ public class ExampleApplication extends Application<ExampleConfiguration> {
}
```

You will also need to make your `ExampleConfiguration` class implement `MicrometerBundleConfiguration`
in order to provide the bundle with the configuration:
```java
public class ExampleConfiguration extends Configuration implements MicrometerBundleConfiguration {
@JsonProperty("prometheus")
private PrometheusConfiguration prometheusConfiguration = new PrometheusConfiguration();

@Override
public PrometheusConfiguration getPrometheusConfiguration() {
return prometheusConfiguration;
}
//...
//...
}
```
Assuming, the above example, configuration element is `prometheus`, so you can use configuration block like this in a config file:
```yaml
prometheus:
endpoint: "/prometheus"
```
This will expose `/prometheus` endpoint in admin connector, by default admin connector is exposed at port `8081`
in dropwizard apps.

Expand Down

0 comments on commit 21380c0

Please # to comment.