A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://github.com/getsentry/sentry-ruby/issues/1290 below:

Exception Handling When Failed To Send An Event · Issue #1290 · getsentry/sentry-ruby · GitHub

Introduction

This plan's goal is to propose a general guideline on how to handle exceptions that occur when the SDK is sending events to Sentry.

The goal is to make sure:

Related Issues

Below are the types of exceptions that could occur when sending an event to Sentry:

External Exceptions

An external exception is an error triggered by something outside of the SDK's control. For example:

These exceptions shouldn't interrupt the user's program. For example, failing to send a transaction to Sentry can't cause the response to return 500. This means:

User Exceptions

Because the SDK also invokes user-defined callbacks, like before_send, those callbacks could trigger arbitrary errors. For example:

These exceptions should not be swallowed.

Exception Handling Principles Exception Hotspots in Ruby SDK's Event Sending Flow

As you can see, the flow can trigger either user or external exceptions, which makes handling them a bit tricky.

Exception Handling In Different Scenarios

Now, because Ruby SDK has different sync/async options, the situation gets even more complicated. Here's the breakdown for different scenarios:

Sending Events Inline (without async nor background worker) With Async

These happen inline

These happen in the worker

With Background Worker

These happen inline

These happen in the worker

Diagram


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4