lib/opentelemetry/sdk/internal.rb in opentelemetry-sdk-0.17.0 vs lib/opentelemetry/sdk/internal.rb in opentelemetry-sdk-1.0.0.rc1

- old
+ new

@@ -42,16 +42,16 @@ def valid_value?(value) valid_simple_value?(value) || valid_array_value?(value) end - def valid_attributes?(attrs) + def valid_attributes?(owner, kind, attrs) attrs.nil? || attrs.all? do |k, v| if !valid_key?(k) - OpenTelemetry.handle_error(message: "invalid attribute key type #{k.class}") + OpenTelemetry.handle_error(message: "invalid #{kind} attribute key type #{k.class} on span '#{owner}'") false elsif !valid_value?(v) - OpenTelemetry.handle_error(message: "invalid attribute value type #{v.class}") + OpenTelemetry.handle_error(message: "invalid #{kind} attribute value type #{v.class} for key '#{k}' on span '#{owner}'") false else true end end