lib/opentelemetry/sdk/internal.rb in opentelemetry-sdk-1.3.1 vs lib/opentelemetry/sdk/internal.rb in opentelemetry-sdk-1.3.2
- old
+ new
@@ -47,20 +47,20 @@
def valid_value?(value)
valid_simple_value?(value) || valid_array_value?(value)
end
def valid_attributes?(owner, kind, attrs)
- attrs.nil? || attrs.all? do |k, v|
+ attrs.nil? || attrs.each do |k, v|
if !valid_key?(k)
OpenTelemetry.handle_error(message: "invalid #{kind} attribute key type #{k.class} on span '#{owner}'")
- false
+ return false
elsif !valid_value?(v)
OpenTelemetry.handle_error(message: "invalid #{kind} attribute value type #{v.class} for key '#{k}' on span '#{owner}'")
- false
- else
- true
+ return false
end
end
+
+ true
end
end
end
end