Creates an exporter that records into spans.
spans
RecordingSpanExporter([List<Span>? spans]) : spans = spans ?? <Span>[];