lib/opentelemetry/instrumentation/base.rb in opentelemetry-instrumentation-base-0.22.1 vs lib/opentelemetry/instrumentation/base.rb in opentelemetry-instrumentation-base-0.22.2
- old
+ new
@@ -267,11 +267,11 @@
# config hash is valid.
# Unknown configuration keys are not included in the final config hash.
# Invalid configuration values are logged, and replaced by the default.
#
# @param [Hash] user_config The user supplied configuration hash
- def config_options(user_config) # rubocop:disable Metrics/MethodLength, Metrics/CyclomaticComplexity, Metrics/PerceivedComplexity
+ def config_options(user_config)
@options ||= {}
user_config ||= {}
config_overrides = config_overrides_from_env
validated_config = @options.each_with_object({}) do |option, h|
option_name = option[:name]
@@ -346,10 +346,10 @@
end
environment_config_overrides
end
- def coerce_env_var(env_var, validation_type) # rubocop:disable Metrics/CyclomaticComplexity
+ def coerce_env_var(env_var, validation_type)
case validation_type
when :array
env_var.split(',').map(&:strip)
when :boolean
env_var.to_s.strip.downcase == 'true'