Uploaded image for project: 'CXF'
  1. CXF
  2. CXF-8367

Micrometer always reports outcome=UNKNOWN on success cases

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 3.4.1
    • Fix Version/s: 3.4.2, 3.3.9, 3.5.0
    • Component/s: JAX-WS Runtime
    • Labels:
      None
    • Estimated Complexity:
      Unknown

      Description

      When I use the new MetricsFeature introduced in CXF-8213, the metrics look like this in positive cases:

      cxf_server_requests_seconds_count{exception="None",faultCode="LOGICAL_RUNTIME_FAULT",method="POST",operation="operation1",outcome="UNKNOWN",status="UNKNOWN",uri="/myendpoint",} 1.0
      cxf_server_requests_seconds_sum{exception="None",faultCode="LOGICAL_RUNTIME_FAULT",method="POST",operation="operation1",outcome="UNKNOWN",status="UNKNOWN",uri="/myendpoint",} 0.221690028
      

      In this case, Message.RESPONSE_CODE is null when the MetricsMessageOutInterceptor is called.

      In success cases, this Message attribute is set in the MessageSenderEndingInterceptor when AbstractHTTPDestination.getResponseCodeFromMessage() is called.

      MetricsMessageOutInterceptor is called before that interceptor, that's why Message.RESPONSE_CODE is not set.

      There are 2 solution options, as far as I understand:

      1. Move the MetricsMessageOutInterceptor after the MessageSenderEndingInterceptor (the consequences of that are unknown to me)
      2. Adjust the StandardTags.status() method to treat null values as 200

       

      There's also another problem of the faultCode being LOGICAL_RUNTIME_FAULT in my success cases. This is because the MAPAggregatorImpl always calls exchange.setOutFaultMessage(). The code inside of JaxwsFaultCodeProvider.getFaultCode() assumes that ex.getOutFaultMessage() != null indicates a Fault.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                reta Andriy Redko
                Reporter:
                bergers Stefan Berger
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: