feat(tracing): Don't allow missing orphan spans to be parents or be finished#636
feat(tracing): Don't allow missing orphan spans to be parents or be finished#636relaxolotl wants to merge 1 commit intotracing/omit-unfinished-spansfrom
Conversation
9e9ed29 to
8f8ee90
Compare
8ee994f to
22809b2
Compare
Swatinem
left a comment
There was a problem hiding this comment.
This might be a bit more validation than we should be doing in the SDK.
From the data model, the spans is just a flat list, and the hierarchy is then reconstructed either on the server, or even the UI. Not sure how much validation happens in later steps, but the SDK might not be the right place for that. Please check with other team members however.
|
i also think this might not be needed if we don't receive spans until they are finished as is already suggested in an earlier PR. Because we'd just drop the orphaned span at the time it is being finished (the transaction ID would not match). |
|
full responsibility is now being placed on users to manage spans and to drop them appropriately if spans are being finished after a transaction is finished. |
Sometimes it's possible to have orphan spans hanging around due to transactions inadvertently being finished before all of its child spans are complete. This adds in handling if we're able to detect those scenarios, preventing those orphan spans from causing cascading failures. The SDK swallows and deallocs such spans.
related to #601
picks up off of #635