Skip to content

Investigate use of parent/child relationship #1239

@roncohen

Description

@roncohen

Today, if you have a span A that does some work, finishes and then runs it's callback to signal completion, then create a span B somewhere in the chain following the callback, the parent of B will be A. See it here: https://github.com/elastic/opbeans-node/blob/master/server/routes.js#L276-L286

We currently only support "ChildOf" and this relationship is not appropriate for this situation. If span A has finished, it should not create more "ChildOf" spans. I realize this means that for Node.js it will be increasingly rare to have any ChildOf spans that are not a ChildOf the transaction. This is OK and it's in line with what the other agents do.

Here's an example of the situation today
strange-parenting

Metadata

Metadata

Assignees

No one assigned

    Labels

    agent-nodejsMake available for APM Agents project planning.discuss

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions