-
Notifications
You must be signed in to change notification settings - Fork 17
Sentry UI profiling and metrics #4635
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
base: master
Are you sure you want to change the base?
Changes from all commits
e9695d0
2066609
1c7153a
a82a996
811cafd
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,32 @@ | ||
| import * as Sentry from '@sentry/browser'; | ||
|
|
||
| declare const globals: { | ||
| sentry_dsn?: string; | ||
| sentry_traces?: number; | ||
| sentry_profiles?: number; | ||
| version?: string; | ||
| env?: string; | ||
| }; | ||
|
|
||
| const enabledEnvs = ['production', 'staging']; | ||
|
|
||
| if (globals && globals.sentry_dsn && enabledEnvs.includes(globals.env)) { | ||
| Sentry.init({ | ||
| dsn: globals.sentry_dsn, | ||
| release: globals.version, | ||
| environment: globals.env, | ||
| integrations: [ | ||
| Sentry.browserTracingIntegration(), | ||
| Sentry.browserProfilingIntegration(), | ||
| ], | ||
|
|
||
| // Percentage of transactions to capture for tracing | ||
| tracesSampleRate: globals.sentry_traces, | ||
|
|
||
| // Percentage of sampled transactions to profile | ||
| profileSessionSampleRate: globals.sentry_profiles, | ||
|
|
||
| // Automatically start/stop profiler based on tracing spans | ||
| profileLifecycle: 'trace', | ||
| }); | ||
| } |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -3,7 +3,7 @@ | |
| if Settings.sentry_dsn | ||
| Sentry.init do |config| | ||
| # Set release version | ||
| config.release = 'stable.01' | ||
| config.release = Settings.version | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think we should start to manually update the string here.
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I find the idea of manually setting it here for each release too easy to forget. I think it would be best to come up with a rather automatic way, if not fully automatic perhaps a automatic check during one of our CI/CD steps. And that goes for all our apps actually (at least all apps that use Sentry). For example, I see a couple of routes depending on what's possible:
Isn't something like this reasonable? |
||
|
|
||
| config.dsn = Settings.sentry_dsn | ||
| config.enabled_environments = %w[production staging] | ||
|
|
||
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.
Do we need this for every action?
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.
We need it according to Sentry docs. For every action? I believe so, in this case since all etmodel requests are basically the UI requests we want to profile.