Created
June 25, 2019 03:08
-
-
Save camwhite/4ac69e9cd0d885b45d48350fc295fb42 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import axios from 'axios' | |
import { | |
init, | |
captureMessage, | |
Transports | |
} from '@sentry/browser' | |
class AxiosTransport extends Transports.BaseTransport { | |
async sendEvent(event) { | |
await axios.post(this.url, event) | |
return { | |
status: 'success' | |
} | |
} | |
} | |
export default { | |
created({ app }) { | |
init({ | |
dsn: process.env.VUE_APP_SENTRY_DSN, | |
transport: AxiosTransport | |
}) | |
}, | |
routeError(context, error) { | |
captureMessage(error) | |
}, | |
catchError(context, error) { | |
captureMessage(error) | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment