Open
Description
[Version: spring-data-commons-2.4.13]
Hi, I have quesiton during digging the behavior of r2dbc, CoroutineCrudRepository.
First of all, What I want to do is logging query with some metadata that only can be retrieved from outer reactor or coroutine context (ex> ipath, eventId, spanId ..).
What I try first is
- Register ProxyConnectionFactory and register listener to log query.
- I wrote the code inside proxy listener that obtain "currentCoroutineContext[ReactorContext]" and use them when logging
But I found that "currentCoroutineContext[ReactorContext]" returns empty.
And I digging the repository behavior and I encounter below code.
Does the code in L168 means that all methods that are invoked in repository interface loose outer ractor or coroutine context?
Is there any way that can pass the outer coroutine or reactor context into repository method invokation?
Thank you.