-
-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add support for Javascript Sentry Support #3
Conversation
Plugin.php
Outdated
@@ -46,6 +47,10 @@ public function boot() | |||
app('sentry')->captureException($exception); | |||
} | |||
}); | |||
|
|||
if ($jsDsn = env('SENTRY_JAVASCRIPT_DSN')) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Use the config instead here, sentry.dsn_js
, set in winter.sentry.packages.sentry/sentry-laravel.config.dsn_js
. That way it can be dynamically configured on a per request basis, for instance if someone wanted to inject a different DSN in the backend vs the frontend contexts.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@jaxwilko that's because you're using js_dsn
, it's defined as dsn_js
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Co-authored-by: Luke Towers <[email protected]>
… into wip/js-sentry
This PR adds support for a javascript specific sentry monitor.
Add:
SENTRY_JAVASCRIPT_DSN="..."
to your .env and the plugin will dynamically inject the sdk and it's configs into backend and frontend pages.