-
Notifications
You must be signed in to change notification settings - Fork 848
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Zipkin span exporter does not serialize arrays as JSON #3598
Comments
Are array tags actually supported in zipkin's data model? I get a 400 Bad request when I try to send up a payload with them. For example, the following with just a string tag yields a 202 status code:
But add an array tag, and you get a 400 status code:
The zipkin proto definition seems to confirm this. |
We definitely can't put json arrays into zipkin as if they were standard attribute values. @mateuszrzeszutek Are you saying we should escape the json-array so that it can be coerced into a String? I think what we built here was the recommendation of the zipkin maintainer at the time, as the closest that zipkin could get to supporting arrays. |
Hmm, possibly? I think that's what we do in Jaeger (well, it's a string-in-protobuf not string-in-json though). I think that's probably what spec means by |
The dotnet implementation appears to just comma separate the values, rather than a JSON list string. The js implementation does the same as dotnot. ( The go implementation serializes as JSON list string as @jkwatson is suggesting. So there's already divergence in the implementations. It may be worth clarifying with the spec. |
So, it sounds like .net and java are currently in alignment, then? |
Yes. |
Describe the bug
The spec mentions that arrays must be serialized to string as a JSON list:
Zipkin exporter just naively joins all values with a comma, it doesn't add the brackets, it doesn't wrap string values with
""
. Note that Jaeger exporter does that correctly and writes all arrays as JSON lists.Additional context
Zipkin unit tests, Jaeger unit tests
The text was updated successfully, but these errors were encountered: