lib/opentelemetry/sdk/trace/export/batch_span_processor.rb in opentelemetry-sdk-1.0.0 vs lib/opentelemetry/sdk/trace/export/batch_span_processor.rb in opentelemetry-sdk-1.0.1

- old
+ new

@@ -185,9 +185,13 @@ def export_batch(batch, timeout: @exporter_timeout_seconds) result_code = @export_mutex.synchronize { @exporter.export(batch, timeout: timeout) } report_result(result_code, batch) result_code + rescue StandardError => e + report_result(FAILURE, batch) + @metrics_reporter.add_to_counter('otel.bsp.error', labels: { 'reason' => e.class.to_s }) + FAILURE end def report_result(result_code, batch) if result_code == SUCCESS @metrics_reporter.add_to_counter('otel.bsp.export.success')