Skip to content

Commit

Permalink
Update handle_error to include more data
Browse files Browse the repository at this point in the history
  • Loading branch information
kaylareopelle committed Nov 22, 2023
1 parent 18c68f7 commit 715c054
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion api/lib/opentelemetry.rb
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ def logger
# @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].compact.join(' - ')}\n#{exception.backtrace}\n#{exception.class}") }
end

# Handles an error by calling the configured error_handler.
Expand Down

0 comments on commit 715c054

Please sign in to comment.