[ https://issues.apache.org/jira/browse/CXF-8220?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17044099#comment-17044099 ]
Andriy Redko commented on CXF-8220: ----------------------------------- Thanks for the issue [~jms_wu] , indeed probably POST_MARSHAL would be a safer choice, I am wondering if you have an example test case (or service impl snippet) when you return the response status code but it does not get propagated property to the trace tags? I am struggling to have the case when status code is not 200 and it is not picked up properly. Thank you. > 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 > > 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)