Trying to count how many spans running at a time

I am attempting to graph a unique count of Spans running across a timeline.

The apm-metrics dataset shows a doc with an "@timestamp" value of the start time of a Span and a "span_duration" field with the value of how long it took. The docs do not, however have a value for the end time of a Span. This is needed to verify if any Spans that were started and have not ended and are still running. This count of Spans would add itself to the total number of Spans running at a time.

So I think I essentially need some kind of visualization or ES|QL query that can count the number of unique "span.id" values started and have ended over time and are still running at the same time.