-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
Request with "parent+children" spans to the zipkin collector service fails with error: index out of range #3404
Comments
@alexsuraykin thanks for reporting this. Would you like to work on a fix? |
hey, out of interest, I went down the street and noticed this comment:
Looking at the 2nd span, it matches this condition. |
The problem appears to be that the |
@alexsuraykin thanks for the reproducer. I think I have a fix, but I am curious how you came by such an input, because the second span is a dual client/server span which should not have been produced by the instrumentation, because it contains client-send an server-receive events that should be logged in different spans (that can share the ID). Are you migrating data from a Zipkin installation to Jaeger? (at query time Zipkin server may merge the two spans into one) |
…pan (#4160) ## Which problem is this PR solving? - Resolves #3404 ## Short description of the changes - Handle case where one input zipkin span is transformed into two Jaeger spans, but still return response with the same length as input - Add a test for dial client/server span provided in #3404 - Side effect: refactor `cmd/collector/app/zipkin` to avoid circular dependencies Signed-off-by: Yuri Shkuro <[email protected]>
…pan (jaegertracing#4160) ## Which problem is this PR solving? - Resolves jaegertracing#3404 ## Short description of the changes - Handle case where one input zipkin span is transformed into two Jaeger spans, but still return response with the same length as input - Add a test for dial client/server span provided in jaegertracing#3404 - Side effect: refactor `cmd/collector/app/zipkin` to avoid circular dependencies Signed-off-by: Yuri Shkuro <[email protected]>
…pan (jaegertracing#4160) ## Which problem is this PR solving? - Resolves jaegertracing#3404 ## Short description of the changes - Handle case where one input zipkin span is transformed into two Jaeger spans, but still return response with the same length as input - Add a test for dial client/server span provided in jaegertracing#3404 - Side effect: refactor `cmd/collector/app/zipkin` to avoid circular dependencies Signed-off-by: Yuri Shkuro <[email protected]> Signed-off-by: shubbham1215 <[email protected]>
If we send parent and children spans in request, jaeger will be failed with error: "runtime error: index out of range"
Steps to reproduce:
Expected result: 202 Accepted
Actual result: 500 Internal Server Error
Additional context
During the debug, we found that the problem occurs in the SubmitZipkinBatch function.
After "Sanitize" there are "mSpans" array with 3 items and "bools" with labels of processed spans :
Where span with "parentId" field was converted in two items.
And then function creates "responses" array with length=2(from original "spans"), but iterates through "bools" with length =3. Eventually there is rises error "index out of range [2] with length 2".
The text was updated successfully, but these errors were encountered: