lib/opentelemetry/exporter/jaeger/collector_exporter.rb in opentelemetry-exporter-jaeger-0.7.0 vs lib/opentelemetry/exporter/jaeger/collector_exporter.rb in opentelemetry-exporter-jaeger-0.8.0
- old
+ new
@@ -27,11 +27,10 @@
auth_header = { 'Authorization': "Basic #{authorization}" }
@transport.add_headers(auth_header)
end
@serializer = ::Thrift::Serializer.new
@shutdown = false
- @tracer = OpenTelemetry.tracer_provider.tracer
end
# Called to export sampled {OpenTelemetry::SDK::Trace::SpanData} structs.
#
# @param [Enumerable<OpenTelemetry::SDK::Trace::SpanData>] span_data the
@@ -71,10 +70,10 @@
rescue URI::InvalidURIError
true
end
def untraced
- @tracer.with_span(OpenTelemetry::Trace::Span.new) { yield }
+ OpenTelemetry::Trace.with_span(OpenTelemetry::Trace::Span.new) { yield }
end
def encoded_batches(span_data)
span_data.group_by(&:resource).map do |resource, spans|
process = Encoder.encoded_process(resource)