openzipkin-attic / docker-zipkin

Docker images for OpenZipkin
Apache License 2.0
688 stars 329 forks source link

Spans are not searchable if integration with spring-cloud-sleuth-stream and spring-cloud-netflix-hystrix-stream together #177

Open hanrw opened 6 years ago

hanrw commented 6 years ago

zipkin2

The issue is that related to javascript when zipkin received data from HystrixStreamTask

solved by

spring:
  sleuth:
    sampler:
      probability: 1.0
    scheduled:
      skipPattern: org.springframework.cloud.netflix.hystrix.stream.HystrixStreamTask

But this not solved broker into zipkin

screen shot 2018-05-22 at 12 22 37 pm

trace json from localhost:9411/api/v2/traces?serviceName=account-service&limit=10

[
    [
        {
            "traceId":"d1b818350a635b05",
            "parentId":"d1b818350a635b05",
            "id":"eb9d43b44af5a690",
            "kind":"CONSUMER",
            "timestamp":1526964982612022,
            "duration":5,
            "localEndpoint":{
                "serviceName":"account-service",
                "ipv4":"172.30.0.13"
            },
            "remoteEndpoint":{
                "serviceName":"broker"
            },
            "tags":{
                "channel":"hystrixStreamOutput"
            }
        },
        {
            "traceId":"d1b818350a635b05",
            "parentId":"eb9d43b44af5a690",
            "id":"6647d666658c39c0",
            "name":"handle",
            "timestamp":1526964982612006,
            "duration":133,
            "localEndpoint":{
                "serviceName":"account-service",
                "ipv4":"172.30.0.13"
            }
        },
        {
            "traceId":"d1b818350a635b05",
            "id":"d1b818350a635b05",
            "kind":"PRODUCER",
            "name":"send",
            "timestamp":1526964982612004,
            "duration":225,
            "localEndpoint":{
                "serviceName":"account-service",
                "ipv4":"172.30.0.13"
            },
            "remoteEndpoint":{
                "serviceName":"broker"
            },
            "tags":{
                "channel":"hystrixStreamOutput"
            }
        }
    ],
    [
        {
            "traceId":"73283c457c75f2ac",
            "parentId":"73283c457c75f2ac",
            "id":"9e7212be93d63513",
            "kind":"CONSUMER",
            "timestamp":1526964982612014,
            "duration":4,
            "localEndpoint":{
                "serviceName":"account-service",
                "ipv4":"172.30.0.13"
            },
            "remoteEndpoint":{
                "serviceName":"broker"
            },
            "tags":{
                "channel":"hystrixStreamOutput"
            }
        },
        {
            "traceId":"73283c457c75f2ac",
            "parentId":"9e7212be93d63513",
            "id":"804239a797189f65",
            "name":"handle",
            "timestamp":1526964982612003,
            "duration":104,
            "localEndpoint":{
                "serviceName":"account-service",
                "ipv4":"172.30.0.13"
            }
        },
        {
            "traceId":"73283c457c75f2ac",
            "id":"73283c457c75f2ac",
            "kind":"PRODUCER",
            "name":"send",
            "timestamp":1526964982612004,
            "duration":151,
            "localEndpoint":{
                "serviceName":"account-service",
                "ipv4":"172.30.0.13"
            },
            "remoteEndpoint":{
                "serviceName":"broker"
            },
            "tags":{
                "channel":"hystrixStreamOutput"
            }
        }
    ],
    [
        {
            "traceId":"d978c2c0db302e27",
            "parentId":"d978c2c0db302e27",
            "id":"47d7ba1fd10fe30b",
            "kind":"CONSUMER",
            "timestamp":1526964982611049,
            "duration":8,
            "localEndpoint":{
                "serviceName":"account-service",
                "ipv4":"172.30.0.13"
            },
            "remoteEndpoint":{
                "serviceName":"broker"
            },
            "tags":{
                "channel":"hystrixStreamOutput"
            }
        },
        {
            "traceId":"d978c2c0db302e27",
            "parentId":"47d7ba1fd10fe30b",
            "id":"e86ee4d71c546254",
            "name":"handle",
            "timestamp":1526964982611007,
            "duration":255,
            "localEndpoint":{
                "serviceName":"account-service",
                "ipv4":"172.30.0.13"
            }
        },
        {
            "traceId":"d978c2c0db302e27",
            "id":"d978c2c0db302e27",
            "kind":"PRODUCER",
            "name":"send",
            "timestamp":1526964982611008,
            "duration":413,
            "localEndpoint":{
                "serviceName":"account-service",
                "ipv4":"172.30.0.13"
            },
            "remoteEndpoint":{
                "serviceName":"broker"
            },
            "tags":{
                "channel":"hystrixStreamOutput"
            }
        }
    ],
    [
        {
            "traceId":"7bb8c17128922016",
            "parentId":"7bb8c17128922016",
            "id":"3064a92e3fba2668",
            "kind":"CONSUMER",
            "timestamp":1526964982611021,
            "duration":4,
            "localEndpoint":{
                "serviceName":"account-service",
                "ipv4":"172.30.0.13"
            },
            "remoteEndpoint":{
                "serviceName":"broker"
            },
            "tags":{
                "channel":"hystrixStreamOutput"
            }
        },
        {
            "traceId":"7bb8c17128922016",
            "parentId":"3064a92e3fba2668",
            "id":"a7bd4b5a559a8de7",
            "name":"handle",
            "timestamp":1526964982611004,
            "duration":126,
            "localEndpoint":{
                "serviceName":"account-service",
                "ipv4":"172.30.0.13"
            }
        },
        {
            "traceId":"7bb8c17128922016",
            "id":"7bb8c17128922016",
            "kind":"PRODUCER",
            "name":"send",
            "timestamp":1526964982611004,
            "duration":182,
            "localEndpoint":{
                "serviceName":"account-service",
                "ipv4":"172.30.0.13"
            },
            "remoteEndpoint":{
                "serviceName":"broker"
            },
            "tags":{
                "channel":"hystrixStreamOutput"
            }
        }
    ],
    [
        {
            "traceId":"c50e4a9909378244",
            "parentId":"c50e4a9909378244",
            "id":"3f3f7b6f0ad18f79",
            "kind":"CONSUMER",
            "timestamp":1526964982112017,
            "duration":6,
            "localEndpoint":{
                "serviceName":"account-service",
                "ipv4":"172.30.0.13"
            },
            "remoteEndpoint":{
                "serviceName":"broker"
            },
            "tags":{
                "channel":"hystrixStreamOutput"
            }
        },
        {
            "traceId":"c50e4a9909378244",
            "parentId":"3f3f7b6f0ad18f79",
            "id":"e538a71b17a15240",
            "name":"handle",
            "timestamp":1526964982112003,
            "duration":93,
            "localEndpoint":{
                "serviceName":"account-service",
                "ipv4":"172.30.0.13"
            }
        },
        {
            "traceId":"c50e4a9909378244",
            "id":"c50e4a9909378244",
            "kind":"PRODUCER",
            "name":"send",
            "timestamp":1526964982112004,
            "duration":130,
            "localEndpoint":{
                "serviceName":"account-service",
                "ipv4":"172.30.0.13"
            },
            "remoteEndpoint":{
                "serviceName":"broker"
            },
            "tags":{
                "channel":"hystrixStreamOutput"
            }
        }
    ],
    [
        {
            "traceId":"e050765323d78fe9",
            "parentId":"e050765323d78fe9",
            "id":"c1923f4279084e17",
            "kind":"CONSUMER",
            "timestamp":1526964982111025,
            "duration":6,
            "localEndpoint":{
                "serviceName":"account-service",
                "ipv4":"172.30.0.13"
            },
            "remoteEndpoint":{
                "serviceName":"broker"
            },
            "tags":{
                "channel":"hystrixStreamOutput"
            }
        },
        {
            "traceId":"e050765323d78fe9",
            "parentId":"c1923f4279084e17",
            "id":"b05452a8b740be51",
            "name":"handle",
            "timestamp":1526964982112004,
            "duration":146,
            "localEndpoint":{
                "serviceName":"account-service",
                "ipv4":"172.30.0.13"
            }
        },
        {
            "traceId":"e050765323d78fe9",
            "id":"e050765323d78fe9",
            "kind":"PRODUCER",
            "name":"send",
            "timestamp":1526964982111004,
            "duration":222,
            "localEndpoint":{
                "serviceName":"account-service",
                "ipv4":"172.30.0.13"
            },
            "remoteEndpoint":{
                "serviceName":"broker"
            },
            "tags":{
                "channel":"hystrixStreamOutput"
            }
        }
    ],
    [
        {
            "traceId":"ef0b5d4783d41fb0",
            "parentId":"ef0b5d4783d41fb0",
            "id":"708a9df41e5cb398",
            "kind":"CONSUMER",
            "timestamp":1526964982111064,
            "duration":7,
            "localEndpoint":{
                "serviceName":"account-service",
                "ipv4":"172.30.0.13"
            },
            "remoteEndpoint":{
                "serviceName":"broker"
            },
            "tags":{
                "channel":"hystrixStreamOutput"
            }
        },
        {
            "traceId":"ef0b5d4783d41fb0",
            "parentId":"708a9df41e5cb398",
            "id":"fa3000b4231a07cc",
            "name":"handle",
            "timestamp":1526964982111004,
            "duration":431,
            "localEndpoint":{
                "serviceName":"account-service",
                "ipv4":"172.30.0.13"
            }
        },
        {
            "traceId":"ef0b5d4783d41fb0",
            "id":"ef0b5d4783d41fb0",
            "kind":"PRODUCER",
            "name":"send",
            "timestamp":1526964982111005,
            "duration":559,
            "localEndpoint":{
                "serviceName":"account-service",
                "ipv4":"172.30.0.13"
            },
            "remoteEndpoint":{
                "serviceName":"broker"
            },
            "tags":{
                "channel":"hystrixStreamOutput"
            }
        }
    ],
    [
        {
            "traceId":"6f287f749d5540a5",
            "parentId":"6f287f749d5540a5",
            "id":"7cbffc86c5ccf26e",
            "kind":"CONSUMER",
            "timestamp":1526964982111023,
            "duration":9,
            "localEndpoint":{
                "serviceName":"account-service",
                "ipv4":"172.30.0.13"
            },
            "remoteEndpoint":{
                "serviceName":"broker"
            },
            "tags":{
                "channel":"hystrixStreamOutput"
            }
        },
        {
            "traceId":"6f287f749d5540a5",
            "parentId":"7cbffc86c5ccf26e",
            "id":"bf2a769204ede455",
            "name":"handle",
            "timestamp":1526964982111005,
            "duration":159,
            "localEndpoint":{
                "serviceName":"account-service",
                "ipv4":"172.30.0.13"
            }
        },
        {
            "traceId":"6f287f749d5540a5",
            "id":"6f287f749d5540a5",
            "kind":"PRODUCER",
            "name":"send",
            "timestamp":1526964982111005,
            "duration":241,
            "localEndpoint":{
                "serviceName":"account-service",
                "ipv4":"172.30.0.13"
            },
            "remoteEndpoint":{
                "serviceName":"broker"
            },
            "tags":{
                "channel":"hystrixStreamOutput"
            }
        }
    ],
    [
        {
            "traceId":"367b60224d280a6a",
            "parentId":"367b60224d280a6a",
            "id":"4654ab8ce6f3310a",
            "kind":"CONSUMER",
            "timestamp":1526964981612030,
            "duration":9,
            "localEndpoint":{
                "serviceName":"account-service",
                "ipv4":"172.30.0.13"
            },
            "remoteEndpoint":{
                "serviceName":"broker"
            },
            "tags":{
                "channel":"hystrixStreamOutput"
            }
        },
        {
            "traceId":"367b60224d280a6a",
            "parentId":"4654ab8ce6f3310a",
            "id":"d4c0d639f93ad841",
            "name":"handle",
            "timestamp":1526964981612006,
            "duration":191,
            "localEndpoint":{
                "serviceName":"account-service",
                "ipv4":"172.30.0.13"
            }
        },
        {
            "traceId":"367b60224d280a6a",
            "id":"367b60224d280a6a",
            "kind":"PRODUCER",
            "name":"send",
            "timestamp":1526964981612007,
            "duration":287,
            "localEndpoint":{
                "serviceName":"account-service",
                "ipv4":"172.30.0.13"
            },
            "remoteEndpoint":{
                "serviceName":"broker"
            },
            "tags":{
                "channel":"hystrixStreamOutput"
            }
        }
    ],
    [
        {
            "traceId":"b2cf9e26db0e1997",
            "parentId":"b2cf9e26db0e1997",
            "id":"c464e99f296f2381",
            "kind":"CONSUMER",
            "timestamp":1526964981611028,
            "duration":8,
            "localEndpoint":{
                "serviceName":"account-service",
                "ipv4":"172.30.0.13"
            },
            "remoteEndpoint":{
                "serviceName":"broker"
            },
            "tags":{
                "channel":"hystrixStreamOutput"
            }
        },
        {
            "traceId":"b2cf9e26db0e1997",
            "parentId":"c464e99f296f2381",
            "id":"c7c2e5ed91c7f99b",
            "name":"handle",
            "timestamp":1526964981611005,
            "duration":208,
            "localEndpoint":{
                "serviceName":"account-service",
                "ipv4":"172.30.0.13"
            }
        },
        {
            "traceId":"b2cf9e26db0e1997",
            "id":"b2cf9e26db0e1997",
            "kind":"PRODUCER",
            "name":"send",
            "timestamp":1526964981611005,
            "duration":302,
            "localEndpoint":{
                "serviceName":"account-service",
                "ipv4":"172.30.0.13"
            },
            "remoteEndpoint":{
                "serviceName":"broker"
            },
            "tags":{
                "channel":"hystrixStreamOutput"
            }
        }
    ]
]
hanrw commented 6 years ago

Another question, how can i skip hystrixStreamOutput into zipkin?