mirror of
https://github.com/overleaf/overleaf.git
synced 2024-11-21 20:47:08 -05:00
Merge pull request #2928 from overleaf/jpa-sentry-unified-release-and-env-annotation
[misc] expose release and environment to frontend GitOrigin-RevId: 2adab7cfb2c63f6d5bc34c367393449c84ef2690
This commit is contained in:
parent
130ea42a79
commit
991c4f9876
4 changed files with 12 additions and 9 deletions
|
@ -44,3 +44,6 @@ RUN mkdir -p /app/data/dumpFolder && \
|
|||
USER node
|
||||
|
||||
CMD ["node", "--expose-gc", "app.js"]
|
||||
|
||||
ARG SENTRY_RELEASE
|
||||
ENV SENTRY_RELEASE=$SENTRY_RELEASE
|
||||
|
|
|
@ -366,9 +366,10 @@ module.exports = function(webRouter, privateApiRouter, publicApiRouter) {
|
|||
recaptchaDisabled:
|
||||
Settings.recaptcha != null ? Settings.recaptcha.disabled : undefined,
|
||||
validRootDocExtensions: Settings.validRootDocExtensions,
|
||||
sentryAllowedOriginRegex:
|
||||
Settings.sentry && Settings.sentry.allowedOriginRegex,
|
||||
sentryDsn: Settings.sentry != null ? Settings.sentry.publicDSN : undefined
|
||||
sentryAllowedOriginRegex: Settings.sentry.allowedOriginRegex,
|
||||
sentryDsn: Settings.sentry.publicDSN,
|
||||
sentryEnvironment: Settings.sentry.environment,
|
||||
sentryRelease: Settings.sentry.release
|
||||
}
|
||||
next()
|
||||
})
|
||||
|
|
|
@ -385,13 +385,10 @@ module.exports = settings =
|
|||
# tenderUrl: ""
|
||||
#
|
||||
# Client-side error logging is provided by getsentry.com
|
||||
# sentry:
|
||||
# src: ""
|
||||
sentry:
|
||||
environment: process.env['SENTRY_ENVIRONMENT']
|
||||
release: process.env['SENTRY_RELEASE']
|
||||
# publicDSN: ""
|
||||
#
|
||||
# src should be either a remote url like
|
||||
# //cdn.ravenjs.com/1.1.22/jquery,native/raven.min.js
|
||||
# or a local file in the js/libs directory.
|
||||
# The publicDSN is the token for the client-side getSentry service.
|
||||
|
||||
# Production Settings
|
||||
|
|
|
@ -6,6 +6,8 @@ if (window.ExposedSettings.sentryDsn) {
|
|||
|
||||
Sentry.init({
|
||||
dsn: window.ExposedSettings.sentryDsn,
|
||||
release: window.ExposedSettings.sentryRelease,
|
||||
environment: window.ExposedSettings.sentryEnvironment,
|
||||
|
||||
// Ignore errors unless they come from our origins
|
||||
// Adapted from: https://docs.sentry.io/platforms/javascript/#decluttering-sentry
|
||||
|
|
Loading…
Reference in a new issue