Composer command:
composer require mati-core/sentry
Configuration:
sentry:
dsn: null # required DNS from sentry.io
environment: local # optional <local | production>
release: 'project-name@version'
user_fields: [] # optional values <website id>
priority_mapping: [] #custom priorities mapping customeName: debug|info|warning|error|fatal
create JS file in your assets directory with name: sentry.js
Sentry.init({
dsn: "your-dsn.sentry.io",
release: "project-name@version",
integrations: [new Sentry.Integrations.BrowserTracing()],
tracesSampleRate: 1.0,
});
Include files in you layout:
<script src="https://browser.sentry-cdn.com/6.3.5/bundle.tracing.min.js"
integrity="sha384-0RpBr4PNjUAqckh8BtmPUuFGNC082TAztkL1VE2ttmtsYJBUvqcZbThnfE5On6h1"
crossOrigin="anonymous"></script>
<script src="{$basePath}/assets/js/sentry.js"></script>
HaHa, It's simple! Every exception caught with Tracy or user browser will be sent automatically into issues in sentry.io.
More info: https://sentry.io