You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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, given throw new CustomError("derp") to search for "CustomError: derp" on Sentry.
The text was updated successfully, but these errors were encountered:
The example configuration says for
lineMatches
:Problem: a RegExp can specify several capture groups, for instance:
In this case, I don't know which capture group the Sentry extension will use. Possible solutions:
"lineMatches": [{ "pattern": "throw new ([A-Z][a-z]+)+(['\"]([\w\s]+)['\"])", "captureGroup": "2"}]
"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.The text was updated successfully, but these errors were encountered: