Add safeguard for sentry_span in connection.rb

This commit is contained in:
Sebastian Serth
2023-09-19 10:09:28 +02:00
parent 56b6380f4d
commit e8619ae5f5

View File

@ -282,6 +282,7 @@ class Runner::Connection
end end
def record_sentry_breadcrumb(sentry_span, event) def record_sentry_breadcrumb(sentry_span, event)
return unless sentry_span
return unless Sentry.initialized? && Sentry.configuration.breadcrumbs_logger.include?(:http_logger) return unless Sentry.initialized? && Sentry.configuration.breadcrumbs_logger.include?(:http_logger)
crumb = Sentry::Breadcrumb.new( crumb = Sentry::Breadcrumb.new(