lib/opentelemetry/instrumentation/registry.rb in opentelemetry-registry-0.3.0 vs lib/opentelemetry/instrumentation/registry.rb in opentelemetry-registry-0.3.1
- old
+ new
@@ -69,14 +69,16 @@
private
def find_instrumentation(instrumentation_name)
@instrumentation.detect { |a| a.instance.name == instrumentation_name }
- &.instance
+ &.instance
end
def install_instrumentation(instrumentation, config)
- if instrumentation.install(config)
+ if !instrumentation.present?
+ OpenTelemetry.logger.debug "Instrumentation: #{instrumentation.name} skipping install given corresponding dependency not found"
+ elsif instrumentation.install(config)
OpenTelemetry.logger.info "Instrumentation: #{instrumentation.name} was successfully installed with the following options #{instrumentation.config}"
else
OpenTelemetry.logger.warn "Instrumentation: #{instrumentation.name} failed to install"
end
rescue => e # rubocop:disable Style/RescueStandardError