Disable actuator metrics by default#927
Merged
Merged
Conversation
….server.requests property
with comments to explain how to enable
This makes it easier to enable/disable the metrics just by exposing 'metrics', instead of changing two separate configuration settings. Also clarifies the intention of filtering and is easier to override using env variable MANAGEMENT_ENDPOINTS_WEB_EXPOSURE_INCLUDE.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Refactored configuration of the actuator
http.server.requestsmetrics in order to make it opt-in instead of opt-out.The (experimental) metrics are now disabled by default and can be enabled by exposing the
metricsendpoint, as inmanagement.endpoints.web.exposure.include=health,info,metrics(default ishealth,info).This can also be done using an environment variable:
MANAGEMENT_ENDPOINTS_WEB_EXPOSURE_INCLUDE=health,info,metricsThe
application.ymlbased metrics filtering has been replaced by a newMeterRegistryCustomizerbean, which denies all meters excepthttp.server.requests.This simplifies configuration for users, because they only need to worry about exposing the metrics endpoint as described above.
In addition,
ActuatorConfigwas renamed toActuatorMetricsConfigfor clarity.related to #836