weixin_39937447
weixin_39937447
2020-12-26 17:58

Zipkin Post from Envoy 1.13.0 to otel-collector sometime fails because of timestamp value format

Envoy 1.13 now only supports zipkin v2 api but sometimes send an invalid payload related to the timestamp using this format: 1.58266276796031e+15. There is already an open issue on Envoy side https://github.com/envoyproxy/envoy/issues/9341 with discussion on Go side to support these kind of value or not... Can this case be handled in otel-collector? Could wait for a long time for Envoy fix...

Request: POST /api/v2/spans HTTP/1.1 host: tracing_zipkin_cluster content-type: application/json x-envoy-internal: true x-forwarded-for: 10.1.72.4 x-envoy-expected-rq-timeout-ms: 5000 transfer-encoding: chunked [{"duration":2741,"kind":"SERVER","localEndpoint":{"port":0,"serviceName":"echocall1","ipv4":"10.1.72.4"},"id":"3691a8bd8b50c194","tags":{"upstream_cluster":"h1_ingress_cluster","guid:x-request-id":"e7761137-f1a0-9cae-a4b4-b7c1855d7c52","http.protocol":"HTTP/1.1","component":"proxy","http.url":"http://echocall1.testmgmt.devappdirect.me/echo","user_agent":"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/80.0.3987.116 Safari/537.36","downstream_cluster":"-","request_size":"0","response_flags":"-","response_size":"11","http.status_code":"200","http.method":"GET"},"shared":true,"traceId":"3691a8bd8b50c194","name":"something","timestamp":1.58266276796031e+15}]

Response: HTTP/1.1 400 Bad Request Content-Type: text/plain; charset=utf-8 X-Content-Type-Options: nosniff Date: Tue, 25 Feb 2020 20:32:51 GMT Content-Length: 98 json: cannot unmarshal number 1.58266276796031e+15 into Go struct field .timestamp of type uint64

该提问来源于开源项目:open-telemetry/opentelemetry-collector

  • 点赞
  • 写回答
  • 关注问题
  • 收藏
  • 复制链接分享
  • 邀请回答

5条回答

  • weixin_39937447 weixin_39937447 4月前

    Argg, seems like there's always something!!! Jeager native tracing is broken with Envoy 13 :( see https://github.com/envoyproxy/envoy/issues/9849

    点赞 评论 复制链接分享
  • weixin_39937447 weixin_39937447 4月前

    FYI, I have created a pr on zipkin-go to handle scientific notation numbers: https://github.com/openzipkin/zipkin-go/pull/161

    once this is merged and new release created collector would only have to update zipkin-go version

    点赞 评论 复制链接分享
  • weixin_39937447 weixin_39937447 4月前

    So zipkin-go rejected the change... so only have to wait for Envoy fix :(

    点赞 评论 复制链接分享
  • weixin_39918248 weixin_39918248 4月前

    Hi -bibeau, isn't it easier to switch Envoy to emit Jaeger or another format? The collector still can send it to a Zipkin backend.

    点赞 评论 复制链接分享
  • weixin_39713686 weixin_39713686 4月前

    Yes, that's what we already decided to do but thought it was still worth it to report the issue here for zipkin receiver.

    点赞 评论 复制链接分享

相关推荐