Uploaded image for project: 'Configuration Persistence Service'
  1. Configuration Persistence Service
  2. CPS-2288

CPS NCMP: Distributed Tracing functionality is not working with webclient

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Not a Bug
    • Icon: Medium Medium
    • Oslo Release
    • Oslo Release
    • NCMP
    • None

      Description
      With webclient implementation the distributed system tracing is not working as expected.
      Incoming requests are visible but outgoing requests toward dmi plugin are not visible.

      I guess it is because webclient should be created by autoconfigured webclient builder, that way the tracing instrumentation can use it, but with the current implementation it can not because the webclient Builder itself is not autoconfigured.

      ehidlor could provide more info about possible solution 

      Affected version:
      3.5.0

      Reproduction
      Have a distributed tracing environment with Jaeger where tracing is enabled.
      Send in a request which is forwarded to dmi plugin:
      localhost:8080/ncmp/v1/ch/<cmHandleId>/data/ds/ncmp-datastore:passthrough-operational?resourceIdentifier=Element=1

      On Jaeger UI the incoming request is visible but the outgoing one towards dmi plugin is not.

      In case of other working services it looks like this it shows outgoing requests too:

      Expected behavior
      Outgoing request towards dmi plugins (both model and data) are visible in tracing

      Impact
      Distributed system tracing can not be used because outgoing requests are not in tracing data

      Workaround
      No workaround found

      Solution proposal
      Something like this could work in DmiWebClientConfiguration:

      • Pass WebClient.Builder webClientBuilder as method parameter to the webClient Bean creator methods.
      • Inside the public webClient bean creator methods pass previously got webclientBuilder to buildAndGetWebClient as method parameter
      • In buildAndGetWebClient we could use that autoconfigured WebClient.Builder instead of calling webClientBuilder(

            sourabh_sourabh Sourabh Sourabh
            csaba.eder csaba Eder
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved:

                Estimated:
                Original Estimate - 1 day, 1 hour
                1d 1h
                Remaining:
                Remaining Estimate - 1 day, 1 hour
                1d 1h
                Logged:
                Time Spent - 0 minutes
                0m