Skip to content
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

Using ActiveSupport::ErrorReporter with capture_message #2460

Open
viralpraxis opened this issue Nov 8, 2024 · 1 comment · May be fixed by #2464
Open

Using ActiveSupport::ErrorReporter with capture_message #2460

viralpraxis opened this issue Nov 8, 2024 · 1 comment · May be fixed by #2464

Comments

@viralpraxis
Copy link

I'm sorry if it already has been discussed, I couldn't find any info on this topic. sentry-rails has built-in integration with ActiveSupport's ErrorReporter which allows to report exceptions with service-agnostic Rails.error API. Reporting exceptions works fine, but surprisingly it does not work (AFAIK) with sentry's message capturing feature.

It seems like there's no restriction on reported object's type from AS' side; Rails.error.report("foobar") propagates message to capture_exception where it fails with "ArgumentError: expect the argument to be a Exception, got String" exception.

I'm curious if it's possible to extend sentry's subscriber to propagate strings to capture_message? Is there a reason it's not implemented yet?

@sl0thentr0py
Copy link
Member

agreed we should add this and fix the string problem

@solnic solnic linked a pull request Nov 14, 2024 that will close this issue
@solnic solnic linked a pull request Nov 14, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Waiting for: Product Owner
Development

Successfully merging a pull request may close this issue.

3 participants