opentelemetry-ruby icon indicating copy to clipboard operation
opentelemetry-ruby copied to clipboard

Zipkin exporter receiving 400 from Open Telemetry Collector

Open lukegil opened this issue 1 year ago • 4 comments

Description of the bug

When sending a trace to an otel-collector, the client receives a 400:

json: cannot unmarshal string into Go struct field Endpoint.remoteEndpoint.Port of type uint16

A repro of this issue can be found here: https://github.com/lukegil/repro-ot-issue

This occurs when a basic "get" is traced, as well as in-the-field cases like when automatically tracing calls to Amazon Cognito.

It appears that the zipkin exporter is explicitly setting port as a string (here, though I could be wrong). Zipkin defines remoteEndpoint.port as being an int.

Share details about your runtime

Operating system details: MacOS 14.1.2 (but also seen on Amz linux) RUBY_ENGINE: "ruby" RUBY_VERSION: "3.0.6" RUBY_DESCRIPTION: "ruby 3.0.6p216 (2023-03-30 revision 23a532679b) [x86_64-darwin22]"

Share a simplified reproduction if possible https://github.com/lukegil/repro-ot-issue

Thanks for all your work! Let me know if I can help

lukegil avatar Apr 30 '24 22:04 lukegil

The port seems expecting int, but zipkin is giving string by looking at the remoteEndpoint from your github repo.

Could you try to change this line to_s to to_i see if can fix

xuan-cao-swi avatar May 21 '24 14:05 xuan-cao-swi

👋 This issue has been marked as stale because it has been open with no activity. You can: comment on the issue or remove the stale label to hold stale off for a while, add the keep label to hold stale off permanently, or do nothing. If you do nothing this issue will be closed eventually by the stale bot.

github-actions[bot] avatar Jun 21 '24 01:06 github-actions[bot]

Hi @lukegil, did you get a chance to test @xuan-cao-swi's recommendation?

kaylareopelle avatar Jul 03 '24 20:07 kaylareopelle

👋 This issue has been marked as stale because it has been open with no activity. You can: comment on the issue or remove the stale label to hold stale off for a while, add the keep label to hold stale off permanently, or do nothing. If you do nothing this issue will be closed eventually by the stale bot.

github-actions[bot] avatar Aug 03 '24 01:08 github-actions[bot]