lib/opentelemetry/sdk/metrics/instrument/up_down_counter.rb in opentelemetry-metrics-sdk-0.2.0 vs lib/opentelemetry/sdk/metrics/instrument/up_down_counter.rb in opentelemetry-metrics-sdk-0.3.0

- old
+ new

@@ -22,10 +22,10 @@ # @param [Numeric] amount The amount to be added, can be positive, negative or zero. # @param [Hash{String => String, Numeric, Boolean, Array<String, Numeric, Boolean>}] attributes # Values must be non-nil and (array of) string, boolean or numeric type. # Array values must not contain nil elements and all elements must be of # the same basic type (string, numeric, boolean). - def add(amount, attributes: nil) + def add(amount, attributes: {}) update(amount, attributes) nil rescue StandardError => e OpenTelemetry.handle_error(exception: e) nil