Skip to content

Using ActiveSupport::ErrorReporter with capture_message #2460

@viralpraxis

Description

@viralpraxis

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?

Metadata

Metadata

Assignees

No fields configured for issues without a type.

Projects

Status

Waiting for: Product Owner

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions