Sha256: 47dade417f1716e9d28ee8b0f83982895347e5de825a58c7d1a22d35d18daec9
Contents?: true
Size: 883 Bytes
Versions: 15
Compression:
Stored size: 883 Bytes
Contents
# frozen_string_literal: true # Copyright The OpenTelemetry Authors # # SPDX-License-Identifier: Apache-2.0 module OpenTelemetry module Exporter module Jaeger # A Thrift-compatible UDP transport. class Transport def initialize(host, port) @socket = UDPSocket.new @socket.connect(host, port) @buffer = ::Thrift::MemoryBufferTransport.new end def write(string) @buffer.write(string) end def flush @socket.send(@buffer.read(@buffer.available), 0) @socket.flush rescue Errno::ECONNREFUSED OpenTelemetry.logger.warn('Unable to connect to Jaeger Agent') rescue StandardError => e OpenTelemetry.logger.warn("Unable to send spans: #{e.message}") end def open; end def close; end end end end end
Version data entries
15 entries across 15 versions & 1 rubygems