lib/datadog/tracing/buffer.rb in ddtrace-1.0.0 vs lib/datadog/tracing/buffer.rb in ddtrace-1.1.0

- old
+ new

@@ -56,19 +56,23 @@ @buffer_accepted += 1 @buffer_accepted_lengths += trace.length @buffer_spans += trace.length rescue StandardError => e - Datadog.logger.debug("Failed to measure queue accept. Cause: #{e.message} Source: #{Array(e.backtrace).first}") + Datadog.logger.debug( + "Failed to measure queue accept. Cause: #{e.class.name} #{e.message} Source: #{Array(e.backtrace).first}" + ) end def measure_drop(trace) @buffer_dropped += 1 @buffer_spans -= trace.length rescue StandardError => e - Datadog.logger.debug("Failed to measure queue drop. Cause: #{e.message} Source: #{Array(e.backtrace).first}") + Datadog.logger.debug( + "Failed to measure queue drop. Cause: #{e.class.name} #{e.message} Source: #{Array(e.backtrace).first}" + ) end def measure_pop(traces) # Accepted, cumulative totals Datadog.health_metrics.queue_accepted(@buffer_accepted) @@ -87,10 +91,12 @@ @buffer_accepted = 0 @buffer_accepted_lengths = 0 @buffer_dropped = 0 @buffer_spans = 0 rescue StandardError => e - Datadog.logger.debug("Failed to measure queue. Cause: #{e.message} Source: #{Array(e.backtrace).first}") + Datadog.logger.debug( + "Failed to measure queue. Cause: #{e.class.name} #{e.message} Source: #{Array(e.backtrace).first}" + ) end end # Trace buffer that stores application traces, has a maximum size, and # can be safely used concurrently on any environment.