Skip to main content
Filter by
Sorted by
Tagged with
0 votes
0 answers
15 views

How to print X-forwarded-for header value in Spring boot-3.3.5 using logback-spring.xml

we recently migrated our spring boot code from version 2.1.11.RELEASE to 3.3.5, previously when using 2.1.11.RELEASE we were able to print the X-Forwarded-For header value in log using spring-cloud-...
Shivam Som's user avatar
0 votes
0 answers
10 views

MDC context erasing if Spring JDBC repository injected

I'm in stuck with reactive spring. I want to add otel tracing to my kotlin with spring WebFlux project. All works fine until I inject spring-data-jdbc repository. When I inject non-reactive repository ...
Alexander's user avatar
  • 171
1 vote
1 answer
32 views

How to propagate and clear thread context across JVMs for dynamic debug logging

I am trying to implement dynamic debug logging by populating a ThreadContext with specific attributes and filtering logs based on those attributes. Here’s what I have achieved so far: Within the same ...
Rahul verma's user avatar
0 votes
0 answers
11 views

RequestLogs aren't getting recorded with siftingappender

This is a workaround for my previous question. How to configure RequestLog for multiple webappcontext in jetty12 In jetty12, Since the RequestLog only exists on the Server level we can't seperate them ...
Hemanth Karniyana's user avatar
0 votes
0 answers
29 views

Quarkus/Vertx: propagate MDC in WorkerExecutor

I'd like to use MDC or something similar to put some additional context informations in my logs, using Quarkus and Vertx. The application is just a command line, not a REST server or any conventional ...
lappo's user avatar
  • 183
3 votes
1 answer
57 views

Cypress - Element covered by another element after angular MDC Upgrade

I recently upgraded my angular to version 16 and with it the material also was updated. Material 16 introduced MDC and because of it my existing E2E test cases are failing. I'm trying to type in a ...
Arokia Lijas's user avatar
0 votes
0 answers
68 views

Is MDC safe to use in spring async event listeners?

If we set a value in MDC using MDC.put, then publish an event using spring boot events (org.springframework.context.ApplicationEventPublisher), in the async listener the MDC value is unfortunately not ...
John Little's user avatar
  • 12.2k
0 votes
0 answers
40 views

Losing MDC context and CorrelationToken in feign

We save the CorrelationToken request header value in the MDC context using a simple filter, then we use this value in the logback.xml to put the token into the logs so we can search for log lines ...
John Little's user avatar
  • 12.2k
0 votes
1 answer
217 views

How to pass MDC data from main thread to webserver http threads

I'm using Spring Boot and MDC to log additional context with each log entry in my REST API application. I use MDC in the main thread, but the data is not passed to the http threads that are created ...
steros's user avatar
  • 1,924
0 votes
0 answers
35 views

How can I extend the method ch.qos.logback.classic.pattern.ThrowableProxyConverter#extraData

I want to modify the printed stack trace information based on this method, but I don't know how to proceed. ch.qos.logback.classic.layout.TTLLLayout The code here is fixed and cannot use SPI or other ...
Kael's user avatar
  • 1
2 votes
1 answer
184 views

TraceId propagation to virtual thread

My application to handle upstream request calls 2 downstream systems (by REST). As calls are parallelizable, I would like to use virtual threads, by StructuredTaskScope.fork() or Executors....
michaldo's user avatar
  • 4,589
2 votes
1 answer
1k views

Spring Boot 3 micrometer tracing in MDC

I need to organize custom tracing and logging. Logging logback (Slf4j). I have a service that needs to read fields from the header and add them to the correlation (before switching to spring boot 3, I ...
Heorhi Utseuski's user avatar
1 vote
0 answers
190 views

Propagation of MDC to a Feign Thread

I whould need to know how I can propagate the MDC (Mapped Diagnostic Context) that I use on the main thread to the thread that Feign uses to call another service. I'm using Spring Boot 3.3.0. This ...
valerio iorio's user avatar
0 votes
1 answer
372 views

MDC not logged when using SLF4J and Log4J2

I'm trying to log MDC using a json formatter in a Wildfly application. I'm hoping to see all of the MDC keys and their values in each of the logs after setting the MDC values. I don't want to use ...
user1022022's user avatar
-1 votes
1 answer
287 views

Variable set in MDC is not accessible in log4j2

I have a spring MVC project( not a springboot ). I am trying to use MDC to add traceId for logging(MDC.set("X_REQUEST_ID",uuid.randomuuid().tostring()). Now I have added the code to set a ...
dead programmer's user avatar
0 votes
0 answers
41 views

How to control the cleaning of the mdc in Spring-Sleuth?

There is a core project that uses Spring-Sleuth. And there is logic in the AspectJ aspect, where some logic is asynchronously executed in CompletableFuture, including logging via Logback. And judging ...
user376237's user avatar
0 votes
0 answers
74 views

Map MDC values into logs of Quarkus application

I am setting an MDC value in my code. I do not know how to map this MDC value into my logs. Example RestEndpoint @Path("/hello") public class ExampleResource { Logger log = ...
Raja's user avatar
  • 647
2 votes
0 answers
605 views

MDC.getcopyofcontextmap() is null on migrating to Springboot 3

I migrated to springboot 3 and suddenly MDC has stopped working. ValueHeader.values().forEach { header -> val headerValue = req.getHeader(header.value) if (!headerValue....
newLearner's user avatar
0 votes
0 answers
261 views

How to propagate MDC in spring cloud gateway

I am using Spring Cloud gateway and in my logback file I am using MDC like to log username to every log line. <property name="LOG_PATTERN" value="%d [TRACE_ID: %X{traceId}] ...
Murad Zulfugarov's user avatar
0 votes
1 answer
466 views

Quarkus - MDC context is not shared between app threads

I have 3.8.1 quarkus application. I use org.slf4j.MDC to provide context information. Also I use io.quarkiverse.logging.logback.quarkus-logging-logback extension. I set context info in ...
Kamilox's user avatar
  • 55
0 votes
1 answer
329 views

Is exception handling mandatory in MDC.remove() or MDC.put()?

import org.slf4j.MDC; MDC.put(ID1, id1); MDC.put(ID2, id2); MDC.put(ID3, id3); try { return joinPoint.proceed(); } finally { MDC....
239010391's user avatar
0 votes
1 answer
836 views

Logback: availability of MDCs in forks created inside a StructuredTaskScope

When using StructuredTaskScope from JEP 453 in Java 21+ and forking multiple tasks, I'd like to have MDC values propagated to the forks, so that all logs are properly correlated. Extending the example ...
adamw's user avatar
  • 8,576
1 vote
1 answer
163 views

WARN StatusConsoleListener The key MDC_KEY was used in both the string and stack-valued MDC

I am using slf4j v2.0.9 and log4j v2.21.1. The MCD log is working as expected but I am getting additionally this following warning. WARN StatusConsoleListener The key MDC_KEY was used in both the ...
MMR's user avatar
  • 45
1 vote
0 answers
510 views

Best practices on migrating to Angular Material MDC?

It feels like Angular Material MDC introduces quite a few "breaking" changes for UIs but I haven't been able to find a detailed enough migration guide (mainly for the SCSS side of things) on ...
ParisFA's user avatar
  • 161
2 votes
1 answer
130 views

Spring integration : transfer mdc in error flow

I'm using spring-integration Most of my flows works on DirectChannels which assure synchronous processing of events however i've noticed that in case of any errors in these flows, the error flow is ...
Krittam Kothari's user avatar
0 votes
0 answers
743 views

How to get MDC context in reactive calls

I've followed the method shared in this repo to attach MDC information to logs in a reactive Spring Boot 3 application, but in my toy application when I try to use contextWrite to add an "mdc&...
spartanhooah's user avatar
0 votes
0 answers
67 views

Trouble displaying transaction ID in WSO2 logs using log4j MDC – limited to a single bundle

I am attempting to pass a transaction ID to WSO2 and display it in the logs using log4j MDC. However, I am encountering an issue where the transaction ID is only displayed in a single bundle, whereas ...
aymen sliti's user avatar
3 votes
1 answer
727 views

Baggage is shared between threads after Spring Boot 3 migration

While migrating from Sleuth to Micrometer, I found a race condition on the update of the MDC context map (complete example can be found here) that boils down to a wrong implementation of the ...
dcolazin's user avatar
  • 1,062
0 votes
1 answer
419 views

Spring Integration delay along with thread MDC context

I've a spring integration flow in which i have currently introduced a manual conditional delay by using Thread.sleep() I understand that this is inefficient and would now like to refactor the whole ...
Krittam Kothari's user avatar
0 votes
1 answer
348 views

quarkus access-logs do not show mdc content after clearing mdc in JAX-RS response filters

I just want to clear MDC content when filter chain is completed. I realized after clearing MDC in LoggingFilter class, Quarkus access logs do not log the content I put in. What I expect is that it ...
C. Bilgin's user avatar
0 votes
1 answer
1k views

Getting two traceId and spanId in my MDC logs

I am using opentelemetry for distributed logging. I have a TracingFilter from which I am putting the traceId and spanId in MDC so that I can use it later for some tracking purpose. TracingFilter.java ...
Abhishek Pandit's user avatar
0 votes
1 answer
178 views

Material 2 Date Picker Android Text Size so small

I face the issue when implement Material 2 DatePicker in MDC. the text size look so small when running. I haven’t implement any theme / style to my date picker screenshot-datepicker I see tutorial ...
annng's user avatar
  • 37
0 votes
1 answer
359 views

Logback & SLF4J Writing to multiple files using the MDCFilter

I have a spring project with these packages: core scheduledJobs web jms Most of the logic is in the core package which is used by the other three packages. The other three packages do not use each ...
budikpet's user avatar
1 vote
0 answers
450 views

How to read the request id from http request header and delegate it to (all) http clients in a spring boot app

Reading of the incoming HTTP Requests with the request id is done by a jakarta.servlet.Filter. @Component class MdcFilter : Filter { private val log = KotlinLogging.logger {} override fun ...
nusmanov's user avatar
  • 491
0 votes
0 answers
297 views

MDC content is not printed via log4j2-jboss-logmanager on quarkus

I want to put a content into "org.jboss.logging.MDC" and make available in logging via log4j2, but value is not showable only for log4j2. I also tried "java.util.logging.Logger" ...
C. Bilgin's user avatar
0 votes
1 answer
2k views

How to log request and response body in WebFlux using MDC + Logbook

I have a Spring Boot application, a reactive service which calls external systems via WebClient. I also have some non-reactive services. There is already implemented logging using MDC + Logbook for ...
stakeika's user avatar
  • 115
0 votes
0 answers
282 views

Access MDC in aspect when uploading multipart in spring webflux

Hello Im using spring boot 3 and spring webflux and micrometer package for tracing in app my dependency for tracing using micrometer: implementation 'io.micrometer:micrometer-tracing-bridge-brave' ...
amir's user avatar
  • 23
1 vote
0 answers
1k views

How to propagate traceId/correlationId to new Threads using Sleuth when using a third party library?

We have a Spring boot micro-service which uses a third party library that internally creates a ThreadPoolExecutor and creates new threads for parallel processing tasks. When using distributed log ...
A_C's user avatar
  • 925
0 votes
1 answer
658 views

Slf4j MDC not working properly in asynchronous scala futures [duplicate]

Hi I am trying to build a custom logging solution for my scala application. The one way I figured out is to used Slf4j MDC which used ThreadLocal to store common variables that can be later extracted ...
Deepak Sharma's user avatar
2 votes
1 answer
640 views

Global Thread-local Storage feasibility and best Practices in Go

I am a beginner in Golang, and I would like to implement something similar to the Mapped Diagnostic Context (MDC) in Java, which is achieved through thread-local storage, in Go. However, I find it ...
Changemyminds's user avatar
0 votes
0 answers
340 views

Why is MDC.get('transactionId') returning null in logback and Java code?

In my project,here is logback.xml <!-- 标准 --> <appender name="stdout" class="ch.qos.logback.core.ConsoleAppender"> <layout class="ch.qos.logback....
chars's user avatar
  • 1
2 votes
1 answer
3k views

MDC context map returning null after migrated to spring boot 3

I'm depending on MDC context map to fetch the traceId and spanId, but after migrating to spring boot 3.0 MDC context map not returning any of the context variables. spring boot 3.0 is using logback ...
Digital's user avatar
  • 591
4 votes
1 answer
6k views

My Kafka consumer retry for 10 times abnormally, and stop its retrying by simply adding a MDC log?

I have a Kafka Listener, I send a single Kafka message to the topic, and my listener receive 10 times (the second one is after the first one complete its handling function, the third one is after the ...
XCCCCLY's user avatar
  • 43
0 votes
0 answers
910 views

How to forward MDC to ReactorClientHttpConnector

I want log mdc by webclient logger WebClient webClient = WebClient.builder() .clientConnector(new ReactorClientHttpConnector(HttpClient.create() .wiretap("reactor.netty....
Данил Ходырев's user avatar
0 votes
1 answer
2k views

Unable to get opentelemetry's trace_id through MDC, even though MDC was working through logging.pattern.level

I have integrated OpenTelemetry in my application and after following this https://github.com/open-telemetry/opentelemetry-java-instrumentation/blob/main/docs/logger-mdc-instrumentation.md, I am able ...
Just Luckie's user avatar
1 vote
1 answer
6k views

Open Telemetry Logger MDC auto-instrumentation

The following Open Telemetry starters have been added to the Spring Boot project (v2.7.2) to instrument the application: <dependency> <groupId>io.opentelemetry.instrumentation</...
Toni's user avatar
  • 4,997
0 votes
1 answer
79 views

background of my activity becomes transparent while closing the app

I've created a calculator app, and it works fine, but there's one question - why the background becomes transparent when i close the app by performing home gesture? Here's how it looks: how to repair ...
macizett's user avatar
-1 votes
1 answer
2k views

Spring-Webflux: Add jaeger traceId to log via MDC

I use Sping-Webflux and want to automatically add jaeger traceId into my @Slf4j log. I have an appender in my logback.xml with %X{traceId} pattern like this <Pattern> %d{yyyy-MM-dd HH:mm:ss}...
Mikhail Geyer's user avatar
1 vote
1 answer
1k views

MDC Put not showing values in log

MDC.put is not inserting values in the logs. logback.xml <appender name="Console" class="ch.qos.logback.core.ConsoleAppender"> <encoder> <pattern&...
Ravi Mishra's user avatar
0 votes
1 answer
2k views

How to share MDC context between threads in multimodule project in kotlin - kotlinx.coroutines.slf4j

I have a multi-module project where I would like to have a context to be shared through the different modules. In my core module (from which all of them depends on), I have created a class to manage ...
Lorena's user avatar
  • 93

1
2 3 4 5
7