[ 
https://issues.apache.org/jira/browse/CXF-7608?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16326848#comment-16326848
 ] 

ASF GitHub Bot commented on CXF-7608:
-------------------------------------

aldex32 commented on issue #367: [CXF-7608] Propagate trace ids as it lets log 
correlation to be consiā€¦
URL: https://github.com/apache/cxf/pull/367#issuecomment-357881668
 
 
   Hi @reta , I tried to do an integration test in the test class you mentioned 
above but didn't succeeded.
   What I did is:
   * Created a server with brave feature with sampling `NEVER_SAMPLER`
   * Invoke one of `bookstore` API
   * Then created a `POST_INVOKE` interceptor which would get the request 
attribute `org.apache.cxf.tracing.brave.span` and check if the 
`TraceScope#SpanInScope` is in `AbstractTracingProvider.TraceScopeHolder`.
   The issue I faced is that I cannot cast 
`((HttpServletRequest)message.get("HTTP.REQUEST")).getAttribute("org.apache.cxf.tracing.brave.span")`
 to `TraceScopeHolder` since it is a protected and then I cannot assert on it.
   
   Do you have any idea how should I test it?

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


> [brave feature] Propagate trace ids as it lets log correlation to be 
> consistent even if not sampling
> ----------------------------------------------------------------------------------------------------
>
>                 Key: CXF-7608
>                 URL: https://issues.apache.org/jira/browse/CXF-7608
>             Project: CXF
>          Issue Type: Bug
>          Components: Integration
>            Reporter: Aldo Sinanaj
>            Priority: Major
>
> Currently the trace ids are not propagated and not reflected on log MDC 
> metadata when it is not sampled. Seems that in 
> {{AbstractBraveProvider.class}} and {{AbstractBraveClientProvider.class}} 
> there is a condition which decides whether or not to do the "brave tracing". 
> I had a chat with [~adriancole] and he suggested me to fix this condition by 
> removing the check on {{span#isNoop}}, since it is not the provider 
> responsibility I guess.
> I'm going to do a pull request on github.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to