Skip to content

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

Open
@joebyneil

Description

@joebyneil

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!

Metadata

Metadata

Assignees

Labels

in: webIssues in web modules (web, webmvc, webflux, websocket)type: enhancementA general enhancement

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions