Applies to:
Summary
When using “Add to dataset” from the UI on a trace, only the root span is added to the dataset instead of all spans in the trace tree. This occurs because the UI action is designed to add individual spans rather than entire trace trees. To add all spans from a trace, use the Dataset Insert API programmatically with properspan_id, root_span_id, and span_parents metadata.
Resolution Steps
Add full trace programmatically
Step 1: Initialize dataset
Import the SDK and initialize your target dataset.Step 2: Insert all spans with trace metadata
Iterate through each span in the trace and insert withspan_id, root_span_id, and span_parents fields.