From 270516cb1ac54bcf3ede888ddfffeb9154fa37d3 Mon Sep 17 00:00:00 2001 From: Abhijeet Prasad Date: Thu, 3 Feb 2022 18:15:21 -0500 Subject: [PATCH] Update error docs to include before_send option (#21275) https://github.com/apache/airflow/pull/18261 Added support for the `before_send` option when initializing the Sentry SDK in airflow. This patch updates the documentation to reflect this change. (cherry picked from commit b38391e2f91760e64576723c876341f532a6ee2d) --- docs/apache-airflow/logging-monitoring/errors.rst | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/docs/apache-airflow/logging-monitoring/errors.rst b/docs/apache-airflow/logging-monitoring/errors.rst index 9f4256ae04c0e..30bb66d5f61fb 100644 --- a/docs/apache-airflow/logging-monitoring/errors.rst +++ b/docs/apache-airflow/logging-monitoring/errors.rst @@ -42,8 +42,14 @@ Add your ``SENTRY_DSN`` to your configuration file e.g. ``airflow.cfg`` in ``[se .. note:: If this value is not provided, the SDK will try to read it from the ``SENTRY_DSN`` environment variable. -You can supply `additional configuration options `__ based on the Python platform via ``[sentry]`` section. -Unsupported options: ``integrations``, ``in_app_include``, ``in_app_exclude``, ``ignore_errors``, ``before_breadcrumb``, ``before_send``, ``transport``. +The ``before_send`` option can be used to modify or drop events before they are sent to Sentry. To set this option, provide a dotted path to a before_send function that the sentry SDK should be configured to use. + +.. code-block:: ini + + [sentry] + before_send = path.to.my.sentry.before_send + +You can supply `additional configuration options `__ based on the Python platform via ``[sentry]`` section. Unsupported options: ``integrations``, ``in_app_include``, ``in_app_exclude``, ``ignore_errors``, ``before_breadcrumb``, ``transport``. Tags -----