Module: OpenTelemetry::SDK::Internal Private
Overview
This module is part of a private API. You should avoid using this module if possible, as it may be removed or be changed in the future.
Internal contains helpers used by the reference implementation.
Instance Method Summary collapse
- #boolean?(value) ⇒ Boolean private
- #valid_attributes?(attrs) ⇒ Boolean private
- #valid_key?(key) ⇒ Boolean private
- #valid_value?(value) ⇒ Boolean private
Instance Method Details
#boolean?(value) ⇒ Boolean
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
15 16 17 |
# File 'lib/opentelemetry/sdk/internal.rb', line 15 def boolean?(value) value.is_a?(TrueClass) || value.is_a?(FalseClass) end |
#valid_attributes?(attrs) ⇒ Boolean
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
27 28 29 |
# File 'lib/opentelemetry/sdk/internal.rb', line 27 def valid_attributes?(attrs) attrs.nil? || attrs.all? { |k, v| valid_key?(k) && valid_value?(v) } end |
#valid_key?(key) ⇒ Boolean
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
19 20 21 |
# File 'lib/opentelemetry/sdk/internal.rb', line 19 def valid_key?(key) key.instance_of?(String) end |
#valid_value?(value) ⇒ Boolean
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
23 24 25 |
# File 'lib/opentelemetry/sdk/internal.rb', line 23 def valid_value?(value) value.instance_of?(String) || value == false || value == true || value.is_a?(Numeric) end |