Skip to content

Support DefaultWebFilterChain allowing the current filter to provide it's name explicitly #34702

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

Open
joebyneil opened this issue Apr 2, 2025 · 0 comments
Labels
in: web Issues in web modules (web, webmvc, webflux, websocket) status: waiting-for-triage An issue we've not yet triaged or decided on

Comments

@joebyneil
Copy link

Hey 👋

I'm currently working with a spring based project that wraps certain WebFilters in an instrumentation decorator. Because of this, the checkpoint in DefaultWebFilterChain outputs the class name of the wrapper rather than the underlying filter.

private Mono<Void> invokeFilter(WebFilter current, DefaultWebFilterChain chain, ServerWebExchange exchange) {
String currentName = current.getClass().getName();
return current.filter(exchange, chain).checkpoint(currentName + " [DefaultWebFilterChain]");
}

eg. DefaultWebFilterChain -> InstrumentationDecorator -> ConcreteWebFilter will checkpoint the name as "InstrumentationDecorator [DefaultWebFilterChain]". Our ideal is "ConcreteWebFilter [DefaultWebFilterChain]", or even just "ConcreteWebFilter".

I'm hoping that we could either:

  • Disable the checkpoint in DefaultWebFilterChain
    OR
  • Provide the name of each WebFilter explicitly

Thanks for your help!

@spring-projects-issues spring-projects-issues added the status: waiting-for-triage An issue we've not yet triaged or decided on label Apr 2, 2025
@jhoeller jhoeller added the in: web Issues in web modules (web, webmvc, webflux, websocket) label Apr 2, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
in: web Issues in web modules (web, webmvc, webflux, websocket) status: waiting-for-triage An issue we've not yet triaged or decided on
Projects
None yet
Development

No branches or pull requests

3 participants