| @@ -8,17 +8,22 @@ | ||
| 8 | 8 | plugins, |
| 9 | 9 | } from '../constants/leadinConfig'; |
| 10 | 10 | |
| 11 | 11 | export function configureRaven() { |
| 12 | - if (hubspotBaseUrl.indexOf('app.hubspot.com') === -1) { | |
| 12 | + if (hubspotBaseUrl.indexOf('local') !== -1) { | |
| 13 | 13 | return; |
| 14 | 14 | } |
| 15 | - | |
| 15 | + const domain = hubspotBaseUrl.replace(/https?:\/\/app/, ''); | |
| 16 | 16 | Raven.config( |
| 17 | - 'https://e9b8f382cdd130c0d415cd977d2be56f@exceptions.hubspot.com/1', | |
| 17 | + `https://a9f08e536ef66abb0bf90becc905b09e@exceptions${domain}/v2/1`, | |
| 18 | 18 | { |
| 19 | 19 | instrument: { |
| 20 | 20 | tryCatch: false, |
| 21 | + }, | |
| 22 | + shouldSendCallback(data) { | |
| 23 | + return ( | |
| 24 | + !!data && !!data.culprit && /plugins\/leadin\//.test(data.culprit) | |
| 25 | + ); | |
| 21 | 26 | }, |
| 22 | 27 | release: leadinPluginVersion, |
| 23 | 28 | } |
| 24 | 29 | ).install(); |