-
Notifications
You must be signed in to change notification settings - Fork 38.2k
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
Add ability to ignore request path prefixes in Observability server filters #29210
Comments
I'm wondering if it wouldn't be better to opt in for paths instead of opt out of them. The log in Sleuth is really complicated to automatically skip certain patterns. Maybe it would be easier to just say what you want to observe instead of what you don't want to observe? |
I've seen lots of teams building apps that has lot of "rpc-like" endpoints: every operation is a different endpoint which is named after what it does. I guess the most important thing though is to make the path, host, method, etc. easily available through common getters from the context. |
After considering different options here, it seems that there is no simple approach for filtering requests. Path prefixes might work for some cases, but the two comments above seem to show that the use cases can also be much more complex. This would also introduce a filtering mechanism that would cause a performance impact in all cases, even if not needed. Additionally, "skipping" the observation here in some cases could confuse other instrumentations down the line. We could of course turn observations into "no-ops". At this stage, the As a result, I'm declining this change in favor of micrometer-metrics/micrometer#3678 (that should allow to "no-op" observations and child observations) and spring-projects/spring-boot#34801 (which should drive the entire feature through predicates). |
Both
HttpRequestsObservationFilter
andHttpRequestsObservationWebFilter
record observations for Spring's web frameworks. It would be generally useful to provide an option to ignore some path prefixes entirely from instrumentation - for example, the Spring Boot Actuator endpoint should not be instrumented in an application.The text was updated successfully, but these errors were encountered: