lib/opentelemetry/instrumentation/registry.rb in opentelemetry-instrumentation-base-0.17.0 vs lib/opentelemetry/instrumentation/registry.rb in opentelemetry-instrumentation-base-0.18.0

- old
+ new

@@ -43,12 +43,14 @@ # passed for as many or as few instrumentations as desired. def install(instrumentation_names, instrumentation_config_map = {}) @lock.synchronize do instrumentation_names.each do |instrumentation_name| instrumentation = find_instrumentation(instrumentation_name) - OpenTelemetry.logger.warn "Could not install #{instrumentation_name} because it was not found" unless instrumentation - - install_instrumentation(instrumentation, instrumentation_config_map[instrumentation.name]) + if instrumentation.nil? + OpenTelemetry.logger.warn "Could not install #{instrumentation_name} because it was not found" + else + install_instrumentation(instrumentation, instrumentation_config_map[instrumentation.name]) + end end end end # Install all instrumentation available and installable in this process.