lib/opentelemetry/instrumentation/base.rb in opentelemetry-instrumentation-base-0.21.1 vs lib/opentelemetry/instrumentation/base.rb in opentelemetry-instrumentation-base-0.22.0
- old
+ new
@@ -57,12 +57,12 @@
# by environment variable and local configuration. An instrumentation disabled
# by environment variable will take precedence over local config. The
# convention for environment variable name is the library name, upcased with
# '::' replaced by underscores, OPENTELEMETRY shortened to OTEL_{LANG}, and '_ENABLED' appended.
# For example: OTEL_RUBY_INSTRUMENTATION_SINATRA_ENABLED = false.
- class Base # rubocop:disable Metrics/ClassLength
+ class Base
class << self
- NAME_REGEX = /^(?:(?<namespace>[a-zA-Z0-9_:]+):{2})?(?<classname>[a-zA-Z0-9_]+)$/.freeze
+ NAME_REGEX = /^(?:(?<namespace>[a-zA-Z0-9_:]+):{2})?(?<classname>[a-zA-Z0-9_]+)$/
VALIDATORS = {
array: ->(v) { v.is_a?(Array) },
boolean: ->(v) { v == true || v == false }, # rubocop:disable Style/MultipleComparison
callable: ->(v) { v.respond_to?(:call) },
integer: ->(v) { v.is_a?(Integer) },