Skip to content

document ignore_errors #149

Closed
Closed

Description

@biblicabeebli

The old raven library had this functionality, implemented for Django by declaring a list of names of errors in the settings file.

This kind of functionality is necessary to control error reporting spam.

Activity

  1. eth3lbert commented on Oct 25, 2018

    @eth3lbert

    There is a ignore_errors options.

  2. biblicabeebli commented on Oct 25, 2018

    @biblicabeebli
    Author

    Could you please link to the documentation for this feature? I have been finding the updated documentation for the new library frustratingly scant in its cross linkings, and laking in details that the older, mature raven library's documentation did contain.

  3. added
    Component: Docs
    and removed on Oct 25, 2018
  4. untitaker commented on Oct 25, 2018

    @untitaker
    Member

    @biblicabeebli we will add this. I'll keep this issue open as reminder

  5. changed the title [-]provide a mechanism for suppressing certain types of errors by class name[/-] [+]document ignore_errors[/+] on Oct 25, 2018
  6. untitaker commented on Oct 29, 2018

    @untitaker
    Member

    @biblicabeebli FWIW we decided not to stabilize ignore_errors for now, in the sense that you can still use it right now but we want to encourage people to use before_send for this instead: https://docs.sentry.io/learn/filtering/?platform=python#before-send

    Concretely we eventually want to use the same syntax for ignore_errors that you can use in the project settings on sentry.io, such that it works the same everywhere.

  7. biblicabeebli commented on Oct 30, 2018

    @biblicabeebli
    Author

    I understand the urge to centralize an inherently scattered feature - integration with every framework/library requires a custom blob of code to extract the configuration correctly - but I strongly disagree with what sounds like a decision to drop probably the most basic necessary feature beyond "does it work" in an error reporting/monitoring framework.

    Asking someone to write their own code to handle this particular issue is silly. This is an error reporting platform. The literal first thing we encountered was "oh, error X is garbage and for Capital-R Reasons we can't disable or squash it, but we don't want that particular one spamming us, how do I disable it..." This cannot possibly be an edge case.

    The above should be sufficient reason to stabilize the feature, but if its not...

    This is an error reporting and monitoring framework. If I can't block a thing at its source - because sometimes its just not possible to block a thing in the Sentry website's UI because it varies just slightly too much - then cannot use the service to monitor my servers. Too many false negatives. I'm going elsewhere.

  8. 23 remaining items

  9. gotedkid195 commented on Apr 1, 2021

    @gotedkid195
  10. untitaker commented on Apr 1, 2021

    @untitaker
    Member

    @gotedkid195 please read the thread first. your question is answered in it.

  11. gotedkid195 commented on Apr 1, 2021

    @gotedkid195

    @untitaker you mean use

    import sentry_sdk
    
    def strip_sensitive_data(event, hint):
        # modify event here
        return event
    
    sentry_sdk.init(
        before_send=strip_sensitive_data
    )
    

    to reslove my issue.

  12. github-actions commented on Dec 23, 2021

    @github-actions
    Contributor

    This issue has gone three weeks without activity. In another week, I will close it.

    But! If you comment or otherwise update it, I will reset the clock, and if you label it Status: Backlog or Status: In Progress, I will leave it alone ... forever!


    "A weed is but an unloved flower." ― Ella Wheeler Wilcox 🥀

  13. antonpirker commented on Mar 2, 2022

    @antonpirker
    Contributor

    A quick tl;dr:

    • In the old Python SDK (called Raven) there was a option ignore_errors where one could give a list of error classes to init() that should not be sent to Sentry.

    • In the new Python SDK (called sentry-python) the option ignore_errors does NOT exit.
      In the new Python SDK you can specify a before_send callback where you can filter out events. So filtering by error class is now done like this:

      import sentry_sdk
      
      def before_send(event, hint):
          if 'exc_info' in hint:
              errors_to_ignore = (IgnoredErrorFoo, IgnoredErrorBar)
              exc_value = hint['exc_info'][1]
      
              if isinstance(exc_value, errors_to_ignore):
                  return None
      
          return event
      
      sentry_sdk.init(before_send=before_send)
  14. locked as resolved and limited conversation to collaborators on Mar 7, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Component: Docs

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions