1

I am trying to prototype getting Spring Cloud Sleuth working with Spring Cloud Stream microservices and sending tracing info to OpenZipkin. It seems to be working however for some reason I'm not seeing what I'd expect in the OpenZipkin GUI.

I uploaded my code here and it should only take 5-10 minutes to get completely running. Including the broker + openzipkin. https://github.com/Mrc0113/spring-cloud-stream-sleuth

Expected Flow: Try-Me Publisher -> uppercase-in-0 topic on broker -> Uppercase Microservice (Trace starts here) -> uppercase-out-0 topic -> Reverse Microservice (Tracing still enabled here...same traceid, different span id) -> reverse-out-0 topic -> Try Me Consumer if you want.

In the OpenZipkin GUI I expected to see the trace showing Spans for both the "UppercaseApp" and the "ReverseApp" however it just shows the spans related to the "UppercaseApp". Shouldn't it show the "ReverseApp" as well?

When you download the JSON from OpenZipkin it shows 6 spans including both microservices so I'm not sure if I'm doing something wrong or if this is just a bug in OpenZipkin's GUI.

openzipkinimage

Downloaded JSON:

[
  {
    "traceId": "ff03e5a7078c7300",
    "parentId": "ff03e5a7078c7300",
    "id": "0e954000ac123168",
    "kind": "CONSUMER",
    "timestamp": 1617974110519267,
    "duration": 17,
    "localEndpoint": {
      "serviceName": "uppercaseapp",
      "ipv4": "192.168.1.25"
    },
    "remoteEndpoint": {
      "serviceName": "broker"
    },
    "tags": {
      "channel": "uppercase"
    }
  },
  {
    "traceId": "ff03e5a7078c7300",
    "parentId": "0e954000ac123168",
    "id": "7cc8f2fe19e3e429",
    "name": "handle",
    "timestamp": 1617974110527406,
    "duration": 3800,
    "localEndpoint": {
      "serviceName": "uppercaseapp",
      "ipv4": "192.168.1.25"
    }
  },
  {
    "traceId": "ff03e5a7078c7300",
    "parentId": "0e954000ac123168",
    "id": "b136a2d5e017b1c6",
    "kind": "PRODUCER",
    "name": "send",
    "timestamp": 1617974110532062,
    "duration": 1802,
    "localEndpoint": {
      "serviceName": "uppercaseapp",
      "ipv4": "192.168.1.25"
    },
    "remoteEndpoint": {
      "serviceName": "broker"
    },
    "tags": {
      "channel": "uppercase"
    }
  },
  {
    "traceId": "ff03e5a7078c7300",
    "parentId": "8432f0d20ee1c58a",
    "id": "eb4d8e0d2265ccf9",
    "kind": "CONSUMER",
    "timestamp": 1617974110633526,
    "duration": 23,
    "localEndpoint": {
      "serviceName": "reverseapp",
      "ipv4": "192.168.1.25"
    },
    "remoteEndpoint": {
      "serviceName": "broker"
    },
    "tags": {
      "channel": "uppercase-out-0"
    }
  },
  {
    "traceId": "ff03e5a7078c7300",
    "parentId": "eb4d8e0d2265ccf9",
    "id": "5d342c6ff6cda3f9",
    "name": "handle",
    "timestamp": 1617974110643065,
    "duration": 4683,
    "localEndpoint": {
      "serviceName": "reverseapp",
      "ipv4": "192.168.1.25"
    }
  },
  {
    "traceId": "ff03e5a7078c7300",
    "parentId": "eb4d8e0d2265ccf9",
    "id": "9d467b04bf9a832e",
    "kind": "PRODUCER",
    "name": "send",
    "timestamp": 1617974110649193,
    "duration": 1998,
    "localEndpoint": {
      "serviceName": "reverseapp",
      "ipv4": "192.168.1.25"
    },
    "remoteEndpoint": {
      "serviceName": "broker"
    },
    "tags": {
      "channel": "uppercase-out-0"
    }
  }
]
Mrc0113
  • 453
  • 3
  • 13

0 Answers0