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

Jianshao Wu commented on CXF-8220:
----------------------------------

I coded a test case, a maven project, some dependencies are needed. Find the 
attachment [^cxf-tracing-test.zip] please.

The last assertion in test case will fail in v3.3.4.
{code:java}
...
 assertEquals(Status.NOT_FOUND.getStatusCode(), 
assertEquals(Status.NOT_FOUND.getStatusCode(), 
tracer.finishedSpans().get(1).tags().get(Tags.HTTP_STATUS.getKey()));
...{code}

> The tag "http.status_code" is always 200 in server side tracing span, no 
> matter what situation 
> -----------------------------------------------------------------------------------------------
>
>                 Key: CXF-8220
>                 URL: https://issues.apache.org/jira/browse/CXF-8220
>             Project: CXF
>          Issue Type: Bug
>          Components: Tracing
>    Affects Versions: 3.3.4
>            Reporter: Jianshao Wu
>            Priority: Major
>         Attachments: cxf-tracing-test.zip
>
>
> The tag "http.status_code" is always 200 in server side tracing span. I 
> investigated source code, found the following code in the method 
> "handleMessage" of  the class 
> "org.apache.cxf.tracing.opentracing.OpenTracingStopInterceptor " :
> {code:java}
>  Integer responseCode = (Integer)message.get(Message.RESPONSE_CODE);
>  if (responseCode == null) {
>  responseCode = 200;
>  }{code}
> The phase of this interceptor is PRE_MARSHAL, in this phase, the responseCode 
> is not put yet. Maybe this interceptor should be bound to another appropriate 
> phase.
>  



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to