• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

zalando / logbook / 5860
97%
master: 100%

Build:
Build:
LAST BUILD BRANCH: main
DEFAULT BRANCH: master
Ran 07 Sep 2026 08:16AM UTC
Jobs 1
Files 237
Run time 1min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

07 Sep 2026 08:12AM UTC coverage: 96.61% (+0.008%) from 96.602%
5860

push

github

web-flow
Allow wrapping async completion listeners in servlet filters (#2345)

For asynchronous requests the response is logged on a different thread
than the one that handled the request, so any thread-local context is
gone by the time the response is written. That is why trace-id is
missing from the response logs of asynchronous endpoints.

Add AsyncOnCompleteListenerWrapper, an extension point that wraps the
listener LogbookFilter registers, while still on the request thread,
which is where such context can be captured:

    new LogbookFilter(logbook).withAsyncOnCompleteListenerWrapper(wrapper);

The wrapper is exposed through a wither, like the existing
withFormRequestMode, rather than through another constructor overload,
which would have made new LogbookFilter(logbook, null) ambiguous.
SecureLogbookFilter delegates to it, so both filters are covered.

The Spring Boot starter registers a no-op default that backs off in
favour of a user-defined bean. The interface is deliberately not a
UnaryOperator<AsyncOnCompleteListener>: generics are erased, so the
back-off would have matched any UnaryOperator bean. A distinct type
also means the bean can be named freely.

The default bean is declared in the servlet-guarded configuration, so
that it is not registered in applications without a servlet on the
classpath.

Both new public types are marked EXPERIMENTAL rather than STABLE, so
that the shape of the extension point can still be adjusted based on
feedback before it is frozen.

Since each filter registers its own listener, the wrapper is invoked
once per filter for every asynchronous request. The README documents
that implementations therefore have to be stateless and thread-safe.

Closes #2283

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

874 of 922 branches covered (94.79%)

16 of 16 new or added lines in 4 files covered. (100.0%)

4018 of 4159 relevant lines covered (96.61%)

0.97 hits per line

Jobs
ID Job ID Ran Files Coverage
1 5860.1 07 Sep 2026 08:16AM UTC 237
96.61
GitHub Action Run
Source Files on build 5860
  • Tree
  • List 237
  • Changed 4
  • Source Changed 4
  • Coverage Changed 4
Coverage ∆ File Lines Relevant Covered Missed Hits/Line Branch Hits Branch Misses
  • Back to Repo
  • Github Actions Build #5860
  • ed146d55 on github
  • Prev Build on main (#5854)
  • Next Build on main (#5861)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE TRIAL · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc