Conversation
481cfec to
9ec2122
Compare
|
So it's only available through the error reporter right? I think we still don't have document for it feature yet. Do you think we can add a |
Sorry, I don't think I understand your question.
Maybe? |
|
I thought it'd be a new API in the Capturing it with the executor will work as well, but it also means the SDKs need to opt-in the error reporter to get it (which I think will encourage more SDKs to opt-in). However, because it's reported via the execution wrapper, we only get I hope Rails can provide more accurate source whenever possible, which in this case seems to be possible? Rails.error_reporter.record(source: "rails_runner.railties") do
# runner execution
endWdyt? |
I don't think it's necessary. |
|
Also, for the user reading the report, the backtrace should make the origin of the error obvious. |
|
Sorry I should've explained: I'm also thinking about using the With the |
9ec2122 to
00c0b38
Compare
|
Ok, I think you convinced me again, so I added a distinct |
There was a problem hiding this comment.
To Sentry, the unhandled_error prefix is not necessary as we'd add another tag called handled to the event. So users can use handled + source tag for searching.
There was a problem hiding this comment.
Right, in this case the unhandled_error is to signal that the application, not the framework, let something bubble up.
There might be a better name for this.
There was a problem hiding this comment.
What do you think if we set the naming rules like [app.][feature.]<component>. For example:
app.action_cable- user'saction_cablelogicaction_cable-action_cableinternal (if possible)redis_cache_store.active_supportapp.runner.railties- user's runner code
I try to mimic the same pattern as the ActiveSupport instrumentation has. But at here the <function> is not always available. And we need an extra flag to indicate if it's the user's code.
There was a problem hiding this comment.
I'd likely go with application over app, it's longer, but Rails doesn't use that much. But yes I like the general idea.
|
Thanks for making the change, I think it'll be super helpful for our users! |
|
@casperisfine After this is merged, I'll push a |
The main reason is to automatically report uncaught exceptions since `rails runner` is often used for cron tasks and such.
00c0b38 to
115be62
Compare
The main reason is to automatically report uncaught exceptions since
rails runneris often used for cron tasks and such.cc @st0012