lib/opentelemetry/sdk/trace/export/simple_span_processor.rb in opentelemetry-sdk-0.16.0 vs lib/opentelemetry/sdk/trace/export/simple_span_processor.rb in opentelemetry-sdk-0.17.0
- old
+ new
@@ -27,9 +27,11 @@
# @param span_exporter the (duck type) SpanExporter to where the
# recorded Spans are pushed.
# @return [SimpleSpanProcessor]
# @raise ArgumentError if the span_exporter is nil.
def initialize(span_exporter)
+ raise ArgumentError, "exporter #{span_exporter.inspect} does not appear to be a valid exporter" unless Common::Utilities.valid_exporter?(span_exporter)
+
@span_exporter = span_exporter
end
# Called when a {Span} is started, if the {Span#recording?}
# returns true.