elastic / elastic/apm-agent-nodejs
does a child of an exitSpan need to be an exitSpan itself to be kept?
- Dominant language
- JavaScript
- Stars
- 594
- Forks
- 244
- Avg merge
- 1d 8h
- Merged PRs (30d)
- 16
Description
Is the `&& childOf._exitSpan` [here](https://github.com/elastic/apm-agent-nodejs/blob/main/lib/instrumentation/transaction.js#L153) a bug? I'm not sure the spec requires that children of exit spans need to be exit spans themselves to be kept.
The context is that @dgieselaar was playing with the APM agent in Kibana to get it to record sub-spans of the Elasticsearch instrumentation spans for the serialize and deserialize phases, using the ES client's diagnostic events. https://github.com/optimyze/kibana/pull/55 Part of the pain in implementing that, is that currently the `childOf._exitSpan` check is requiring that a child of an exit span must itself be an exit span to be kept. [Here](https://github.com/optimyze/kibana/pull/55/files#diff-af04e66f9526f656459ddf2ac7676c860383c1c35220d3a8702ff68beca6110eR48) is here Dario made his created spans to be exit spans.
A *problem* with requiring that `&& childOf._exitSpan` check, is that once compressed spans land, the add "serialization", "request", "deserialization" spans will be sibling exit spans of the same kind... which will be "compressed", which is not at all what is wanted for these.
Contributor guide
Assessment
This issue has not been assessed yet.