Extend SpanCollector interface with close method.