lib/opentelemetry/exporter/jaeger/collector_exporter.rb in opentelemetry-exporter-jaeger-0.8.0 vs lib/opentelemetry/exporter/jaeger/collector_exporter.rb in opentelemetry-exporter-jaeger-0.9.0

- old
+ new

@@ -34,12 +34,13 @@ # Called to export sampled {OpenTelemetry::SDK::Trace::SpanData} structs. # # @param [Enumerable<OpenTelemetry::SDK::Trace::SpanData>] span_data the # list of recorded {OpenTelemetry::SDK::Trace::SpanData} structs to be # exported. + # @param [optional Numeric] timeout An optional timeout in seconds. # @return [Integer] the result of the export. - def export(span_data) + def export(span_data, timeout: nil) return FAILURE if @shutdown encoded_batches(span_data).each do |batch| @transport.write(@serializer.serialize(batch)) end @@ -54,10 +55,12 @@ end # Called when {OpenTelemetry::SDK::Trace::Tracer#shutdown} is called, if # this exporter is registered to a {OpenTelemetry::SDK::Trace::Tracer} # object. - def shutdown + # + # @param [optional Numeric] timeout An optional timeout in seconds. + def shutdown(timeout: nil) @shutdown = true end private