networkteam / sentry_client

TYPO3 Extension for exception logging with sentry, see http://www.getsentry.com
33 stars 36 forks source link

Question: How much ignored messages should be within a regular expression until the performance gets down? #108

Open josefglatz opened 1 month ago

josefglatz commented 1 month ago

Hi,

due to the fact that many exceptions are coming from 3rd party extension it's not that easy to fix all of them.

Is there a max number of messages which you put in the regular expression as a maximum value?

christophlehmann commented 3 weeks ago

I bet preg_match() has a limit, never checked.

It could be cleaner to have a list of regular expressions (that needs to go to EXTCONF)

EXTCONF:
  sentry_client:
    ignoreMessageRegexp:
      # Bots on Powermail forms
      - 'Required argument.*mail.*Powermail.*FormController.*create'
      # Forbidden backend access (https://review.typo3.org/c/Packages/TYPO3.CMS/+/84726)
      - 'The IP address of your client does not match the list of allowed IP addresses'

What do you think?

josefglatz commented 3 weeks ago

That looks very clean to me. However, do I understand correct: each array item represents an regex? With that approach it's also easily possible to add some regexps for exact matching and not exact matching which is pretty useful!