-
Notifications
You must be signed in to change notification settings - Fork 40.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ObservationFilter beans are not registered automatically #33968
Comments
I found the Spring Boot Docs to be more accurate for the behavior I am seeing. The migration guide should be updated to remove the false statement. It would be great if |
Thanks for letting us know! I've removed the |
I wonder if we should consider this to be a bug of omission as we registered |
I'd vote for assuming that this is a bug of omission. We should be auto injecting |
The Spring Boot 3.0 Migration Guide indicates the following, but this does not appear to be the case.
Steps to duplicate
I am using Spring Boot 3.0.2
Create an application with Spring Initializer with Spring Web, Lombok, and Actuator dependencies
Modify the main application class as follows
Run the application and perform an HTTP request to
http://localhost:8080/test
. Notice the log statement is not printed.Add the following bean into the main application class. Based on the docs, this step shouldn't be necessary.
Restart the application and perform the same HTTP request to
http://localhost:8080/test
. Notice the log statement is now printed indicating the filter is being registered and used.It appears that
ObservationRegistryConfigurer
created byObservationRegistryPostProcessor
does not get injected with aObjectProvider<ObservationFilter>
, but all other aspects of the registry can be configured this way. Is this an omission, or is the documentation incorrect?I also can't find any usages of
ObservationRegistry.observationConfig().observationFilter(...)
that would indicate auto configuration is registeringObservationFilter
beans provided by the application as stated in the migration guide.The text was updated successfully, but these errors were encountered: