-
Notifications
You must be signed in to change notification settings - Fork 2
Open
Description
The example configuration says for lineMatches:
Make sure to capture the error message in a RegExp group
Problem: a RegExp can specify several capture groups, for instance:
/throw new ([A-Z][a-z]+)+(['"]([\w\s]+)['"])/
In this case, I don't know which capture group the Sentry extension will use. Possible solutions:
- Document the capture group used by the Sentry exception; users must write RegExps where that capture group always contains the error message to be used in the query string.
- Allow to specify through configuration the capture group that should be used through the query string, eg.
"lineMatches": [{ "pattern": "throw new ([A-Z][a-z]+)+(['\"]([\w\s]+)['\"])", "captureGroup": "2"}] - Allow to specify through configuration a template where one or more capture groups could be interpolated, eg.:
"lineMatches": [{ "pattern": "throw new ([A-Z][a-z]+)+(['\"]([\w\s]+)['\"])", "searchQuery": "$1: $2"}], which would allow, giventhrow new CustomError("derp")to search for"CustomError: derp"on Sentry.
Metadata
Metadata
Assignees
Labels
No labels