lib/opentelemetry.rb in opentelemetry-api-1.3.0 vs lib/opentelemetry.rb in opentelemetry-api-1.4.0
- old
+ new
@@ -32,10 +32,10 @@
end
# @return [Callable] configured error handler or a default that logs the
# exception and message at ERROR level.
def error_handler
- @error_handler ||= ->(exception: nil, message: nil) { logger.error("OpenTelemetry error: #{[message, exception&.message].compact.join(' - ')}") }
+ @error_handler ||= ->(exception: nil, message: nil) { logger.error("OpenTelemetry error: #{[message, exception&.message, exception&.backtrace&.first].compact.join(' - ')}") }
end
# Handles an error by calling the configured error_handler.
#
# @param [optional Exception] exception The exception to be handled