-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
Issue while logging MDC values with Jetty 12 #11715
Labels
Bug
For general bugs on Jetty side
Comments
This does not seem a Jetty issue. Jetty will (possibly) use different threads to invoke If these 3 consecutive lines do not work, then Jetty is out of the picture: MDC.setContextMap(mdc)
MDC.put(ABORTED, "true")
log.debug("aborted") Do you have a Java reproducer that we can try? |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Jetty version(s)
Jetty 12.0.8
Jetty Environment
core
Java version/vendor
(use: java -version)
Amazon Corretto 17.0.9
OS type/version
Ubuntu 22.04.4 LTS
Description
We have a service A that initiates an API call to another service B. In response service B transfers zip file in chunk to service A. We have written a custom response listener which transfer chunk from service A to its client without storing it in buffer.
while doing so when ever connection is aborted from client of service A, key-value pair which we are inserting into MDC map are getting cleared out and we are unable to log those key-value.
for example
MDC.put(ABORTED, "true") is not printed in log
logback-access version
2.0.2
Note: we are using kotlin as our programming language
How to reproduce?
Attached code for ref
logging.txt
handler.txt
The text was updated successfully, but these errors were encountered: