-
Notifications
You must be signed in to change notification settings - Fork 41.6k
Closed
Description
Since #16090, the spring.jmx.enabled property has been set to false by default.
With that change, we should re-evaluate default enablement of Actuator endpoints since:
- by default only
"info"and"health"are exposed over HTTP - it doesn't make sense to consume resources to create those endpoints if they're not exposed in any way (JMX nor HTTP)
We could in this case avoid creating endpoints when possible; we should refine OnEnabledEndpointCondition and decide to enable a given endpoint with the following conditions (for example, with the "env" endpoint):
- Enable/disable the endpoint if explicitly configured with
"management.endpoint.env.enabled" - Enable/disable all endpoints if explicitly configured with
"management.endpoints.enabled-by-default" - Enable the endpoint if it is enabled by default with
@Endpoint(id = "env", enableByDefault = true)and it is exposed as an HTTP endpoint (see"management.endpoints.web.exposure.include") or JMX is enabled and this endpoint is exposed over JMX (see"spring.jmx.enabled"and"management.endpoints.jmx.exposure.include") - Otherwise, disable this endpoint
With this improvement, we don't need to change the defaults on @Endpoint annotations, as we still want to retain the difference between enablement and exposure; fr example, the "shutdown" endpoint is not enabled by default.
Metadata
Metadata
Assignees
Labels
type: enhancementA general enhancementA general enhancement