-
Notifications
You must be signed in to change notification settings - Fork 535
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Enable on_error when using with rails #4830
Comments
Are you getting an error when you try this or does it just appear unsupported from the docs? What specific google gems are you using so I can try to reproduce the issue here. |
@thagomizer I am using the |
Observed in latest If on_error is used in Google::Cloud.configure, it can catch the exceptions raised in the application.
But if it is used inside Rails config as follows, it is not catching exceptions.
I have noticed the source codes here [1] and found that on_error is not copied in ErrorReporting (Cloud Trace and Cloud Logging also) for Rails. If this behavior is intended and [1] google-cloud-ruby/google-cloud-error_reporting/lib/google/cloud/error_reporting/rails.rb Line 108 in 257524a
[2] Line 187 in 26b6ee9
[3] https://github.com/googleapis/google-cloud-ruby/blob/main/google-cloud-trace/README.md#authentication |
Is your feature request related to a problem? Please describe.
I would like to know whenever logging fails. It seems that there is a way to do it when using it without the rails setup but it's unclear if it is possible to use it otherwise.
Describe the solution you'd like
I would like to be able to set it like the following:
Describe alternatives you've considered
just use it as it is used for non-rails apps
Additional context
google-cloud-ruby/google-cloud-logging/lib/google/cloud/logging/async_writer.rb
Lines 322 to 325 in 26b6ee9
The text was updated successfully, but these errors were encountered: