Skip to content
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

[7.x] add span reparenting field child_ids (#3679) #3684

Merged
merged 1 commit into from
Apr 23, 2020

Conversation

graphaelli
Copy link
Member

Backports the following commits to 7.x:

@graphaelli graphaelli merged commit 9bb9657 into elastic:7.x Apr 23, 2020
@graphaelli graphaelli deleted the backport/7.x/pr-3679 branch April 23, 2020 12:57
@axw axw self-assigned this May 12, 2020
@axw
Copy link
Member

axw commented May 12, 2020

Verified. First I sent a transaction ("tx") with three spans: parent, child, grandchild. Child and grandchild both set "parent_id" to parent, like in the inferred spans scenario:

{"metadata":{"service":{"name":"foo","agent":{"name":"bar","version":"1.0"}}}}                                                                                                                       
{"transaction":{"id":"e05278a871c22b01","name":"tx","type":"request","duration":1,"timestamp":1496170407154000,"span_count":{"dropped":0,"started":0},"trace_id":"e825a4a629a6d3738f7dc6283e3bc98a"}}
{"span":{"id":"8aedd6f0dc6769a0","timestamp":1496170407154000,"name":"parent","type":"app","duration":1,"parent_id":"e05278a871c22b01","trace_id":"e825a4a629a6d3738f7dc6283e3bc98a"}}               
{"span":{"id":"6c9764db5c348a43","timestamp":1496170407154000,"name":"grandchild","type":"app","duration":0.5,"parent_id":"8aedd6f0dc6769a0","trace_id":"e825a4a629a6d3738f7dc6283e3bc98a"}}         
{"span":{"id":"a1fe370ca4900421","timestamp":1496170407154000,"name":"child","type":"app","duration":0.5,"parent_id":"8aedd6f0dc6769a0","trace_id":"e825a4a629a6d3738f7dc6283e3bc98a"}}              

image

I then changed the "child" span event, adding the "grandchild" span's ID to it child IDs:

{"span":{"id":"a1fe370ca4900421","timestamp":1496170407154000,"name":"child","type":"app","duration":0.5,"parent_id":"8aedd6f0dc6769a0","trace_id":"e825a4a629a6d3738f7dc6283e3bc98a","child_ids":["6c9764db5c348a43"]}}

We can see in Discover that this value is indexed in the new child.id field:

image

And the waterfall looks as expected:

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants