lib/opentelemetry/exporter/zipkin/exporter.rb in opentelemetry-exporter-zipkin-0.17.0 vs lib/opentelemetry/exporter/zipkin/exporter.rb in opentelemetry-exporter-zipkin-0.18.0
- old
+ new
@@ -130,10 +130,10 @@
end
def send_spans(zipkin_spans, timeout: nil) # rubocop:disable Metrics/AbcSize, Metrics/CyclomaticComplexity, Metrics/MethodLength
retry_count = 0
timeout ||= @timeout
- start_time = Time.now
+ start_time = OpenTelemetry::Common::Utilities.timeout_timestamp
around_request do # rubocop:disable Metrics/BlockLength
request = Net::HTTP::Post.new(@path)
request.body = JSON.generate(zipkin_spans)
request.add_field('Content-Type', 'application/json')
@headers&.each { |key, value| request.add_field(key, value) }