helidon-io / helidon

Java libraries for writing microservices
https://helidon.io
Apache License 2.0
3.51k stars 566 forks source link

Build observe using 'server.features.observe' in main,but it doesn't exist config in application.yaml #8955

Closed essapp closed 3 months ago

essapp commented 3 months ago

Environment Details


Problem Description

main.java: ObserveFeature observe = ObserveFeature.builder() .config(config.get("server.features.observe")) .addObserver(HealthObserver.builder() .addCheck(DbClientHealthCheck.create(dbClient, config.get("db.health-check"))) .build()) .build(); applicationyaml: server: port: 8080 host: 0.0.0.0

app: greeting: "Hello"

Steps to reproduce

Reproducing the environment: https://github.com/essapp/server

tvallin commented 3 months ago

Thanks for catching this.

This property can be used to customized observability : https://helidon.io/docs/v4/se/observability