Correct ObservationRegistry Type Reference

This commit is contained in:
Xi Minghui 2024-08-26 11:59:59 +08:00 committed by Josh Cummings
parent febe5e6ddf
commit 0b98eb4139
2 changed files with 4 additions and 4 deletions

View File

@ -127,7 +127,7 @@ public class MyApplication {
}
@Bean
ObservationRegistry<ObservationRegistry> observationRegistry() {
ObservationRegistry observationRegistry() {
ObservationRegistry registry = ObservationRegistry.create();
registry.observationConfig().observationHandler(new ObservationTextPublisher());
return registry;
@ -157,7 +157,7 @@ class MyApplication {
}
@Bean
fun observationRegistry(): ObservationRegistry<ObservationRegistry> {
fun observationRegistry(): ObservationRegistry {
ObservationRegistry registry = ObservationRegistry.create()
registry.observationConfig().observationHandler(ObservationTextPublisher())
return registry

View File

@ -132,7 +132,7 @@ public class MyApplication {
}
@Bean
ObservationRegistry<ObservationRegistry> observationRegistry() {
ObservationRegistry observationRegistry() {
ObservationRegistry registry = ObservationRegistry.create();
registry.observationConfig().observationHandler(new ObservationTextPublisher());
return registry;
@ -162,7 +162,7 @@ class MyApplication {
}
@Bean
fun observationRegistry(): ObservationRegistry<ObservationRegistry> {
fun observationRegistry(): ObservationRegistry {
ObservationRegistry registry = ObservationRegistry.create()
registry.observationConfig().observationHandler(ObservationTextPublisher())
return registry