Update Wavefront property names (#107)

* Update Wavefront property names
Wavefront property names have changed since Spring Boot 3.0
https://docs.spring.io/spring-boot/docs/3.0.0/reference/html/actuator.html#actuator.metrics.export.wavefront
fixes #97
This commit is contained in:
Toshiaki Maki
2024-01-24 23:32:30 +09:00
committed by GitHub
parent 5df853e6ee
commit 9be8ffbff9
3 changed files with 6 additions and 6 deletions

View File

@@ -450,8 +450,8 @@ Disable Property: `org.springframework.cloud.bindings.boot.wavefront.enable`
| Property | Value |
| ----------------------------------------------- | ------------- |
| `management.metrics.export.wavefront.api-token` | `{api-token}` |
| `management.metrics.export.wavefront.uri` | `{uri}` |
| `management.wavefront.api-token` | `{api-token}` |
| `management.wavefront.uri` | `{uri}` |
## Extending Spring Boot Configuration

View File

@@ -42,8 +42,8 @@ public final class WavefrontBindingsPropertiesProcessor implements BindingsPrope
bindings.filterBindings(TYPE).forEach(binding -> {
MapMapper map = new MapMapper(binding.getSecret(), properties);
map.from("api-token").to("management.metrics.export.wavefront.api-token");
map.from("uri").to("management.metrics.export.wavefront.uri");
map.from("api-token").to("management.wavefront.api-token");
map.from("uri").to("management.wavefront.uri");
});
}

View File

@@ -50,8 +50,8 @@ final class WavefrontBindingsPropertiesProcessorTest {
void test() {
new WavefrontBindingsPropertiesProcessor().process(environment, bindings, properties);
assertThat(properties)
.containsEntry("management.metrics.export.wavefront.api-token", "test-api-token")
.containsEntry("management.metrics.export.wavefront.uri", "test-uri");
.containsEntry("management.wavefront.api-token", "test-api-token")
.containsEntry("management.wavefront.uri", "test-uri");
}
@Test