fix: remove sentry
This commit is contained in:
parent
8c71066660
commit
c6122d33b9
25 changed files with 1 additions and 310 deletions
89
.pnp.cjs
generated
89
.pnp.cjs
generated
|
@ -121,7 +121,6 @@ const RAW_RUNTIME_STATE =
|
|||
["@lerna-lite/cli", "npm:1.6.0"],\
|
||||
["@lerna-lite/list", "npm:1.6.0"],\
|
||||
["@lerna-lite/run", "npm:1.6.0"],\
|
||||
["@sentry/node", "npm:7.28.1"],\
|
||||
["@types/jest", "npm:29.1.1"],\
|
||||
["@types/newrelic", "npm:9.13.0"],\
|
||||
["@types/node", "npm:18.11.9"],\
|
||||
|
@ -3910,67 +3909,6 @@ const RAW_RUNTIME_STATE =
|
|||
"linkType": "HARD"\
|
||||
}]\
|
||||
]],\
|
||||
["@sentry/core", [\
|
||||
["npm:7.28.1", {\
|
||||
"packageLocation": "./.yarn/cache/@sentry-core-npm-7.28.1-a468033ea8-f29d747d3e.zip/node_modules/@sentry/core/",\
|
||||
"packageDependencies": [\
|
||||
["@sentry/core", "npm:7.28.1"],\
|
||||
["@sentry/types", "npm:7.28.1"],\
|
||||
["@sentry/utils", "npm:7.28.1"],\
|
||||
["tslib", "npm:1.14.1"]\
|
||||
],\
|
||||
"linkType": "HARD"\
|
||||
}]\
|
||||
]],\
|
||||
["@sentry/node", [\
|
||||
["npm:7.28.1", {\
|
||||
"packageLocation": "./.yarn/cache/@sentry-node-npm-7.28.1-b0e124fdfc-b4922d1f0a.zip/node_modules/@sentry/node/",\
|
||||
"packageDependencies": [\
|
||||
["@sentry/node", "npm:7.28.1"],\
|
||||
["@sentry/core", "npm:7.28.1"],\
|
||||
["@sentry/types", "npm:7.28.1"],\
|
||||
["@sentry/utils", "npm:7.28.1"],\
|
||||
["cookie", "npm:0.4.2"],\
|
||||
["https-proxy-agent", "npm:5.0.1"],\
|
||||
["lru_map", "npm:0.3.3"],\
|
||||
["tslib", "npm:1.14.1"]\
|
||||
],\
|
||||
"linkType": "HARD"\
|
||||
}]\
|
||||
]],\
|
||||
["@sentry/tracing", [\
|
||||
["npm:7.28.1", {\
|
||||
"packageLocation": "./.yarn/cache/@sentry-tracing-npm-7.28.1-e15d453d8e-be501ca9d7.zip/node_modules/@sentry/tracing/",\
|
||||
"packageDependencies": [\
|
||||
["@sentry/tracing", "npm:7.28.1"],\
|
||||
["@sentry/core", "npm:7.28.1"],\
|
||||
["@sentry/types", "npm:7.28.1"],\
|
||||
["@sentry/utils", "npm:7.28.1"],\
|
||||
["tslib", "npm:1.14.1"]\
|
||||
],\
|
||||
"linkType": "HARD"\
|
||||
}]\
|
||||
]],\
|
||||
["@sentry/types", [\
|
||||
["npm:7.28.1", {\
|
||||
"packageLocation": "./.yarn/cache/@sentry-types-npm-7.28.1-42d9a8574c-7dc6639cb7.zip/node_modules/@sentry/types/",\
|
||||
"packageDependencies": [\
|
||||
["@sentry/types", "npm:7.28.1"]\
|
||||
],\
|
||||
"linkType": "HARD"\
|
||||
}]\
|
||||
]],\
|
||||
["@sentry/utils", [\
|
||||
["npm:7.28.1", {\
|
||||
"packageLocation": "./.yarn/cache/@sentry-utils-npm-7.28.1-71eaeb767f-a4b5f73db0.zip/node_modules/@sentry/utils/",\
|
||||
"packageDependencies": [\
|
||||
["@sentry/utils", "npm:7.28.1"],\
|
||||
["@sentry/types", "npm:7.28.1"],\
|
||||
["tslib", "npm:1.14.1"]\
|
||||
],\
|
||||
"linkType": "HARD"\
|
||||
}]\
|
||||
]],\
|
||||
["@simplewebauthn/iso-webcrypto", [\
|
||||
["npm:7.0.1", {\
|
||||
"packageLocation": "./.yarn/cache/@simplewebauthn-iso-webcrypto-npm-7.0.1-bae5f6738c-ed506490e0.zip/node_modules/@simplewebauthn/iso-webcrypto/",\
|
||||
|
@ -4063,7 +4001,6 @@ const RAW_RUNTIME_STATE =
|
|||
["@aws-sdk/client-sns", "npm:3.259.0"],\
|
||||
["@aws-sdk/client-sqs", "npm:3.259.0"],\
|
||||
["@newrelic/winston-enricher", "virtual:c66bf20e88479ada0172094776519a9f51acc4731d22079b60a295bcec7ea42d5545cbce58a77a50d932bf953298799135e99707486e343da6d99ba1d167bdbd#npm:4.0.1"],\
|
||||
["@sentry/node", "npm:7.28.1"],\
|
||||
["@standardnotes/common", "workspace:packages/common"],\
|
||||
["@standardnotes/domain-core", "workspace:packages/domain-core"],\
|
||||
["@standardnotes/domain-events", "workspace:packages/domain-events"],\
|
||||
|
@ -4117,7 +4054,6 @@ const RAW_RUNTIME_STATE =
|
|||
"packageDependencies": [\
|
||||
["@standardnotes/api-gateway", "workspace:packages/api-gateway"],\
|
||||
["@newrelic/winston-enricher", "virtual:c66bf20e88479ada0172094776519a9f51acc4731d22079b60a295bcec7ea42d5545cbce58a77a50d932bf953298799135e99707486e343da6d99ba1d167bdbd#npm:4.0.1"],\
|
||||
["@sentry/node", "npm:7.28.1"],\
|
||||
["@standardnotes/domain-core", "workspace:packages/domain-core"],\
|
||||
["@standardnotes/domain-events", "workspace:packages/domain-events"],\
|
||||
["@standardnotes/domain-events-infra", "workspace:packages/domain-events-infra"],\
|
||||
|
@ -4166,8 +4102,6 @@ const RAW_RUNTIME_STATE =
|
|||
["@cbor-extract/cbor-extract-linux-arm64", "npm:2.1.1"],\
|
||||
["@cbor-extract/cbor-extract-linux-x64", "npm:2.1.1"],\
|
||||
["@newrelic/winston-enricher", "virtual:c66bf20e88479ada0172094776519a9f51acc4731d22079b60a295bcec7ea42d5545cbce58a77a50d932bf953298799135e99707486e343da6d99ba1d167bdbd#npm:4.0.1"],\
|
||||
["@sentry/node", "npm:7.28.1"],\
|
||||
["@sentry/tracing", "npm:7.28.1"],\
|
||||
["@simplewebauthn/server", "npm:7.0.1"],\
|
||||
["@simplewebauthn/typescript-types", "npm:7.0.0"],\
|
||||
["@standardnotes/api", "npm:1.25.3"],\
|
||||
|
@ -4393,7 +4327,6 @@ const RAW_RUNTIME_STATE =
|
|||
["@aws-sdk/client-s3", "npm:3.259.0"],\
|
||||
["@aws-sdk/client-sns", "npm:3.259.0"],\
|
||||
["@aws-sdk/client-sqs", "npm:3.259.0"],\
|
||||
["@sentry/node", "npm:7.28.1"],\
|
||||
["@standardnotes/config", "npm:2.4.3"],\
|
||||
["@standardnotes/domain-core", "workspace:packages/domain-core"],\
|
||||
["@standardnotes/domain-events", "workspace:packages/domain-events"],\
|
||||
|
@ -4491,7 +4424,6 @@ const RAW_RUNTIME_STATE =
|
|||
["@aws-sdk/client-s3", "npm:3.259.0"],\
|
||||
["@aws-sdk/client-sqs", "npm:3.259.0"],\
|
||||
["@newrelic/winston-enricher", "virtual:c66bf20e88479ada0172094776519a9f51acc4731d22079b60a295bcec7ea42d5545cbce58a77a50d932bf953298799135e99707486e343da6d99ba1d167bdbd#npm:4.0.1"],\
|
||||
["@sentry/node", "npm:7.28.1"],\
|
||||
["@standardnotes/api", "npm:1.25.3"],\
|
||||
["@standardnotes/common", "workspace:packages/common"],\
|
||||
["@standardnotes/domain-core", "workspace:packages/domain-core"],\
|
||||
|
@ -4537,7 +4469,6 @@ const RAW_RUNTIME_STATE =
|
|||
["@aws-sdk/client-sns", "npm:3.259.0"],\
|
||||
["@aws-sdk/client-sqs", "npm:3.259.0"],\
|
||||
["@newrelic/winston-enricher", "virtual:c66bf20e88479ada0172094776519a9f51acc4731d22079b60a295bcec7ea42d5545cbce58a77a50d932bf953298799135e99707486e343da6d99ba1d167bdbd#npm:4.0.1"],\
|
||||
["@sentry/node", "npm:7.28.1"],\
|
||||
["@standardnotes/domain-core", "workspace:packages/domain-core"],\
|
||||
["@standardnotes/domain-events", "workspace:packages/domain-events"],\
|
||||
["@standardnotes/domain-events-infra", "workspace:packages/domain-events-infra"],\
|
||||
|
@ -4595,7 +4526,6 @@ const RAW_RUNTIME_STATE =
|
|||
["@lerna-lite/cli", "npm:1.6.0"],\
|
||||
["@lerna-lite/list", "npm:1.6.0"],\
|
||||
["@lerna-lite/run", "npm:1.6.0"],\
|
||||
["@sentry/node", "npm:7.28.1"],\
|
||||
["@types/jest", "npm:29.1.1"],\
|
||||
["@types/newrelic", "npm:9.13.0"],\
|
||||
["@types/node", "npm:18.11.9"],\
|
||||
|
@ -4673,8 +4603,6 @@ const RAW_RUNTIME_STATE =
|
|||
["@aws-sdk/client-sns", "npm:3.259.0"],\
|
||||
["@aws-sdk/client-sqs", "npm:3.259.0"],\
|
||||
["@newrelic/winston-enricher", "virtual:c66bf20e88479ada0172094776519a9f51acc4731d22079b60a295bcec7ea42d5545cbce58a77a50d932bf953298799135e99707486e343da6d99ba1d167bdbd#npm:4.0.1"],\
|
||||
["@sentry/node", "npm:7.28.1"],\
|
||||
["@sentry/tracing", "npm:7.28.1"],\
|
||||
["@standardnotes/api", "npm:1.25.3"],\
|
||||
["@standardnotes/common", "workspace:packages/common"],\
|
||||
["@standardnotes/domain-core", "workspace:packages/domain-core"],\
|
||||
|
@ -4774,7 +4702,6 @@ const RAW_RUNTIME_STATE =
|
|||
["@standardnotes/websockets-server", "workspace:packages/websockets"],\
|
||||
["@aws-sdk/client-sqs", "npm:3.259.0"],\
|
||||
["@newrelic/winston-enricher", "virtual:c66bf20e88479ada0172094776519a9f51acc4731d22079b60a295bcec7ea42d5545cbce58a77a50d932bf953298799135e99707486e343da6d99ba1d167bdbd#npm:4.0.1"],\
|
||||
["@sentry/node", "npm:7.28.1"],\
|
||||
["@standardnotes/api", "npm:1.25.3"],\
|
||||
["@standardnotes/common", "workspace:packages/common"],\
|
||||
["@standardnotes/domain-core", "workspace:packages/domain-core"],\
|
||||
|
@ -7378,13 +7305,6 @@ const RAW_RUNTIME_STATE =
|
|||
}]\
|
||||
]],\
|
||||
["cookie", [\
|
||||
["npm:0.4.2", {\
|
||||
"packageLocation": "./.yarn/cache/cookie-npm-0.4.2-7761894d5f-e2b0be16f5.zip/node_modules/cookie/",\
|
||||
"packageDependencies": [\
|
||||
["cookie", "npm:0.4.2"]\
|
||||
],\
|
||||
"linkType": "HARD"\
|
||||
}],\
|
||||
["npm:0.5.0", {\
|
||||
"packageLocation": "./.yarn/cache/cookie-npm-0.5.0-e2d58a161a-23bd6dd64f.zip/node_modules/cookie/",\
|
||||
"packageDependencies": [\
|
||||
|
@ -11070,15 +10990,6 @@ const RAW_RUNTIME_STATE =
|
|||
"linkType": "HARD"\
|
||||
}]\
|
||||
]],\
|
||||
["lru_map", [\
|
||||
["npm:0.3.3", {\
|
||||
"packageLocation": "./.yarn/cache/lru_map-npm-0.3.3-a038bb3418-356e840fb3.zip/node_modules/lru_map/",\
|
||||
"packageDependencies": [\
|
||||
["lru_map", "npm:0.3.3"]\
|
||||
],\
|
||||
"linkType": "HARD"\
|
||||
}]\
|
||||
]],\
|
||||
["make-dir", [\
|
||||
["npm:2.1.0", {\
|
||||
"packageLocation": "./.yarn/cache/make-dir-npm-2.1.0-1ddaf205e7-be9cf8f5e2.zip/node_modules/make-dir/",\
|
||||
|
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
@ -39,7 +39,6 @@
|
|||
},
|
||||
"packageManager": "yarn@4.0.0-rc.43",
|
||||
"dependencies": {
|
||||
"@sentry/node": "^7.28.1",
|
||||
"newrelic": "^10.0.0"
|
||||
}
|
||||
}
|
||||
|
|
|
@ -41,7 +41,6 @@
|
|||
"@aws-sdk/client-sns": "^3.259.0",
|
||||
"@aws-sdk/client-sqs": "^3.259.0",
|
||||
"@newrelic/winston-enricher": "^4.0.1",
|
||||
"@sentry/node": "^7.28.1",
|
||||
"@standardnotes/common": "workspace:*",
|
||||
"@standardnotes/domain-core": "workspace:^",
|
||||
"@standardnotes/domain-events": "workspace:*",
|
||||
|
|
|
@ -2,8 +2,6 @@ import 'reflect-metadata'
|
|||
|
||||
import 'newrelic'
|
||||
|
||||
import * as Sentry from '@sentry/node'
|
||||
|
||||
import '../src/Controller/LegacyController'
|
||||
import '../src/Controller/HealthCheckController'
|
||||
|
||||
|
@ -84,25 +82,11 @@ void container.load().then((container) => {
|
|||
Disallow: '/',
|
||||
}),
|
||||
)
|
||||
|
||||
if (env.get('SENTRY_DSN', true)) {
|
||||
Sentry.init({
|
||||
dsn: env.get('SENTRY_DSN'),
|
||||
integrations: [new Sentry.Integrations.Http({ tracing: false, breadcrumbs: true })],
|
||||
tracesSampleRate: 0,
|
||||
})
|
||||
|
||||
app.use(Sentry.Handlers.requestHandler() as RequestHandler)
|
||||
}
|
||||
})
|
||||
|
||||
const logger: winston.Logger = container.get(TYPES.Logger)
|
||||
|
||||
server.setErrorConfig((app) => {
|
||||
if (env.get('SENTRY_DSN', true)) {
|
||||
app.use(Sentry.Handlers.errorHandler() as ErrorRequestHandler)
|
||||
}
|
||||
|
||||
app.use((error: Record<string, unknown>, _request: Request, response: Response, _next: NextFunction) => {
|
||||
logger.error(error.stack)
|
||||
|
||||
|
|
|
@ -21,7 +21,6 @@
|
|||
},
|
||||
"dependencies": {
|
||||
"@newrelic/winston-enricher": "^4.0.1",
|
||||
"@sentry/node": "^7.28.1",
|
||||
"@standardnotes/domain-core": "workspace:^",
|
||||
"@standardnotes/domain-events": "workspace:*",
|
||||
"@standardnotes/domain-events-infra": "workspace:*",
|
||||
|
|
|
@ -56,10 +56,6 @@ USER_SERVER_REGISTRATION_URL=
|
|||
USER_SERVER_CHANGE_EMAIL_URL=
|
||||
USER_SERVER_AUTH_KEY=
|
||||
|
||||
# (Optional) Sentry Setup
|
||||
SENTRY_DSN=
|
||||
SENTRY_ENVIRONMENT=
|
||||
|
||||
VALET_TOKEN_SECRET=
|
||||
VALET_TOKEN_TTL=
|
||||
|
||||
|
|
|
@ -2,9 +2,6 @@ import 'reflect-metadata'
|
|||
|
||||
import 'newrelic'
|
||||
|
||||
import * as Sentry from '@sentry/node'
|
||||
import * as Tracing from '@sentry/tracing'
|
||||
|
||||
import '../src/Controller/HealthCheckController'
|
||||
import '../src/Controller/SessionController'
|
||||
import '../src/Controller/SessionsController'
|
||||
|
@ -53,39 +50,11 @@ void container.load().then((container) => {
|
|||
app.use(json())
|
||||
app.use(urlencoded({ extended: true }))
|
||||
app.use(cors())
|
||||
|
||||
if (env.get('SENTRY_DSN', true)) {
|
||||
const tracesSampleRate = env.get('SENTRY_TRACE_SAMPLE_RATE', true)
|
||||
? +env.get('SENTRY_TRACE_SAMPLE_RATE', true)
|
||||
: 0
|
||||
|
||||
const profilesSampleRate = env.get('SENTRY_PROFILES_SAMPLE_RATE', true)
|
||||
? +env.get('SENTRY_PROFILES_SAMPLE_RATE', true)
|
||||
: 0
|
||||
Sentry.init({
|
||||
dsn: env.get('SENTRY_DSN'),
|
||||
integrations: [
|
||||
new Sentry.Integrations.Http({ tracing: tracesSampleRate !== 0 }),
|
||||
new Tracing.Integrations.Express({
|
||||
app,
|
||||
}),
|
||||
],
|
||||
tracesSampleRate,
|
||||
profilesSampleRate,
|
||||
})
|
||||
|
||||
app.use(Sentry.Handlers.requestHandler())
|
||||
app.use(Sentry.Handlers.tracingHandler())
|
||||
}
|
||||
})
|
||||
|
||||
const logger: winston.Logger = container.get(TYPES.Logger)
|
||||
|
||||
server.setErrorConfig((app) => {
|
||||
if (env.get('SENTRY_DSN', true)) {
|
||||
app.use(Sentry.Handlers.errorHandler() as ErrorRequestHandler)
|
||||
}
|
||||
|
||||
app.use((error: Record<string, unknown>, _request: Request, response: Response, _next: NextFunction) => {
|
||||
logger.error(error.stack)
|
||||
|
||||
|
|
|
@ -37,8 +37,6 @@
|
|||
"@cbor-extract/cbor-extract-linux-arm64": "^2.1.1",
|
||||
"@cbor-extract/cbor-extract-linux-x64": "^2.1.1",
|
||||
"@newrelic/winston-enricher": "^4.0.1",
|
||||
"@sentry/node": "^7.28.1",
|
||||
"@sentry/tracing": "^7.28.1",
|
||||
"@simplewebauthn/server": "^7.0.1",
|
||||
"@simplewebauthn/typescript-types": "^7.0.0",
|
||||
"@standardnotes/api": "^1.25.3",
|
||||
|
|
|
@ -2,7 +2,6 @@ import 'reflect-metadata'
|
|||
|
||||
import 'newrelic'
|
||||
|
||||
import * as Sentry from '@sentry/node'
|
||||
import * as busboy from 'connect-busboy'
|
||||
|
||||
import '../src/Controller/HealthCheckController'
|
||||
|
@ -73,25 +72,11 @@ void container.load().then((container) => {
|
|||
Disallow: '/',
|
||||
}),
|
||||
)
|
||||
|
||||
if (env.get('SENTRY_DSN', true)) {
|
||||
Sentry.init({
|
||||
dsn: env.get('SENTRY_DSN'),
|
||||
integrations: [new Sentry.Integrations.Http({ tracing: false, breadcrumbs: true })],
|
||||
tracesSampleRate: 0,
|
||||
})
|
||||
|
||||
app.use(Sentry.Handlers.requestHandler() as RequestHandler)
|
||||
}
|
||||
})
|
||||
|
||||
const logger: winston.Logger = container.get(TYPES.Logger)
|
||||
|
||||
server.setErrorConfig((app) => {
|
||||
if (env.get('SENTRY_DSN', true)) {
|
||||
app.use(Sentry.Handlers.errorHandler() as ErrorRequestHandler)
|
||||
}
|
||||
|
||||
app.use((error: Record<string, unknown>, _request: Request, response: Response, _next: NextFunction) => {
|
||||
logger.error(error.stack)
|
||||
|
||||
|
|
|
@ -28,7 +28,6 @@
|
|||
"@aws-sdk/client-s3": "^3.259.0",
|
||||
"@aws-sdk/client-sns": "^3.259.0",
|
||||
"@aws-sdk/client-sqs": "^3.259.0",
|
||||
"@sentry/node": "^7.28.1",
|
||||
"@standardnotes/domain-core": "workspace:^",
|
||||
"@standardnotes/domain-events": "workspace:*",
|
||||
"@standardnotes/domain-events-infra": "workspace:*",
|
||||
|
|
|
@ -2,8 +2,6 @@ import 'reflect-metadata'
|
|||
|
||||
import 'newrelic'
|
||||
|
||||
import * as Sentry from '@sentry/node'
|
||||
|
||||
import * as cors from 'cors'
|
||||
import { urlencoded, json, Request, Response, NextFunction, RequestHandler, ErrorRequestHandler } from 'express'
|
||||
import * as winston from 'winston'
|
||||
|
@ -30,25 +28,11 @@ void container.load().then((container) => {
|
|||
app.use(json())
|
||||
app.use(urlencoded({ extended: true }))
|
||||
app.use(cors())
|
||||
|
||||
if (env.get('SENTRY_DSN', true)) {
|
||||
Sentry.init({
|
||||
dsn: env.get('SENTRY_DSN'),
|
||||
integrations: [new Sentry.Integrations.Http({ tracing: false, breadcrumbs: true })],
|
||||
tracesSampleRate: 0,
|
||||
})
|
||||
|
||||
app.use(Sentry.Handlers.requestHandler() as RequestHandler)
|
||||
}
|
||||
})
|
||||
|
||||
const logger: winston.Logger = container.get(TYPES.Logger)
|
||||
|
||||
server.setErrorConfig((app) => {
|
||||
if (env.get('SENTRY_DSN', true)) {
|
||||
app.use(Sentry.Handlers.errorHandler() as ErrorRequestHandler)
|
||||
}
|
||||
|
||||
app.use((error: Record<string, unknown>, _request: Request, response: Response, _next: NextFunction) => {
|
||||
logger.error(error.stack)
|
||||
|
||||
|
|
|
@ -26,7 +26,6 @@
|
|||
"@aws-sdk/client-s3": "^3.259.0",
|
||||
"@aws-sdk/client-sqs": "^3.259.0",
|
||||
"@newrelic/winston-enricher": "^4.0.1",
|
||||
"@sentry/node": "^7.28.1",
|
||||
"@standardnotes/api": "^1.25.3",
|
||||
"@standardnotes/common": "workspace:^",
|
||||
"@standardnotes/domain-core": "workspace:^",
|
||||
|
|
|
@ -27,7 +27,6 @@
|
|||
"@aws-sdk/client-sns": "^3.259.0",
|
||||
"@aws-sdk/client-sqs": "^3.259.0",
|
||||
"@newrelic/winston-enricher": "^4.0.1",
|
||||
"@sentry/node": "^7.28.1",
|
||||
"@standardnotes/domain-core": "workspace:^",
|
||||
"@standardnotes/domain-events": "workspace:*",
|
||||
"@standardnotes/domain-events-infra": "workspace:*",
|
||||
|
|
|
@ -2,9 +2,6 @@ import 'reflect-metadata'
|
|||
|
||||
import 'newrelic'
|
||||
|
||||
import * as Sentry from '@sentry/node'
|
||||
import * as Tracing from '@sentry/tracing'
|
||||
|
||||
import '../src/Controller/HealthCheckController'
|
||||
import '../src/Controller/ItemsController'
|
||||
|
||||
|
@ -55,39 +52,11 @@ void container.load().then((container) => {
|
|||
app.use(json({ limit: '50mb' }))
|
||||
app.use(urlencoded({ extended: true, limit: '50mb', parameterLimit: 5000 }))
|
||||
app.use(cors())
|
||||
|
||||
if (env.get('SENTRY_DSN', true)) {
|
||||
const tracesSampleRate = env.get('SENTRY_TRACE_SAMPLE_RATE', true)
|
||||
? +env.get('SENTRY_TRACE_SAMPLE_RATE', true)
|
||||
: 0
|
||||
|
||||
const profilesSampleRate = env.get('SENTRY_PROFILES_SAMPLE_RATE', true)
|
||||
? +env.get('SENTRY_PROFILES_SAMPLE_RATE', true)
|
||||
: 0
|
||||
Sentry.init({
|
||||
dsn: env.get('SENTRY_DSN'),
|
||||
integrations: [
|
||||
new Sentry.Integrations.Http({ tracing: tracesSampleRate !== 0 }),
|
||||
new Tracing.Integrations.Express({
|
||||
app,
|
||||
}),
|
||||
],
|
||||
tracesSampleRate,
|
||||
profilesSampleRate,
|
||||
})
|
||||
|
||||
app.use(Sentry.Handlers.requestHandler())
|
||||
app.use(Sentry.Handlers.tracingHandler())
|
||||
}
|
||||
})
|
||||
|
||||
const logger: winston.Logger = container.get(TYPES.Logger)
|
||||
|
||||
server.setErrorConfig((app) => {
|
||||
if (env.get('SENTRY_DSN', true)) {
|
||||
app.use(Sentry.Handlers.errorHandler() as ErrorRequestHandler)
|
||||
}
|
||||
|
||||
app.use((error: Record<string, unknown>, _request: Request, response: Response, _next: NextFunction) => {
|
||||
logger.error(error.stack)
|
||||
|
||||
|
|
|
@ -29,8 +29,6 @@
|
|||
"@aws-sdk/client-sns": "^3.259.0",
|
||||
"@aws-sdk/client-sqs": "^3.259.0",
|
||||
"@newrelic/winston-enricher": "^4.0.1",
|
||||
"@sentry/node": "^7.28.1",
|
||||
"@sentry/tracing": "^7.28.1",
|
||||
"@standardnotes/api": "^1.25.3",
|
||||
"@standardnotes/common": "workspace:*",
|
||||
"@standardnotes/domain-core": "workspace:^",
|
||||
|
|
|
@ -2,8 +2,6 @@ import 'reflect-metadata'
|
|||
|
||||
import 'newrelic'
|
||||
|
||||
import * as Sentry from '@sentry/node'
|
||||
|
||||
import '../src/Infra/InversifyExpressUtils/InversifyExpressHealthCheckController'
|
||||
import '../src/Infra/InversifyExpressUtils/InversifyExpressWebSocketsController'
|
||||
|
||||
|
@ -31,25 +29,11 @@ void container.load().then((container) => {
|
|||
app.use(json())
|
||||
app.use(urlencoded({ extended: true }))
|
||||
app.use(cors())
|
||||
|
||||
if (env.get('SENTRY_DSN', true)) {
|
||||
Sentry.init({
|
||||
dsn: env.get('SENTRY_DSN'),
|
||||
integrations: [new Sentry.Integrations.Http({ tracing: false, breadcrumbs: true })],
|
||||
tracesSampleRate: 0,
|
||||
})
|
||||
|
||||
app.use(Sentry.Handlers.requestHandler() as RequestHandler)
|
||||
}
|
||||
})
|
||||
|
||||
const logger: winston.Logger = container.get(TYPES.Logger)
|
||||
|
||||
server.setErrorConfig((app) => {
|
||||
if (env.get('SENTRY_DSN', true)) {
|
||||
app.use(Sentry.Handlers.errorHandler() as ErrorRequestHandler)
|
||||
}
|
||||
|
||||
app.use((error: Record<string, unknown>, _request: Request, response: Response, _next: NextFunction) => {
|
||||
logger.error(error.stack)
|
||||
|
||||
|
|
|
@ -24,7 +24,6 @@
|
|||
"dependencies": {
|
||||
"@aws-sdk/client-sqs": "^3.259.0",
|
||||
"@newrelic/winston-enricher": "^4.0.1",
|
||||
"@sentry/node": "^7.28.1",
|
||||
"@standardnotes/api": "^1.25.3",
|
||||
"@standardnotes/common": "workspace:^",
|
||||
"@standardnotes/domain-core": "workspace:^",
|
||||
|
|
82
yarn.lock
82
yarn.lock
|
@ -3059,61 +3059,6 @@ __metadata:
|
|||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"@sentry/core@npm:7.28.1":
|
||||
version: 7.28.1
|
||||
resolution: "@sentry/core@npm:7.28.1"
|
||||
dependencies:
|
||||
"@sentry/types": "npm:7.28.1"
|
||||
"@sentry/utils": "npm:7.28.1"
|
||||
tslib: "npm:^1.9.3"
|
||||
checksum: f29d747d3e15000d8010fe3c192260a78927f37d30a3bb82cd533f3a5beca0c7fd81353ec57420c4295daea5384a045bde70ff6d3af1468ec1201b1d84131d6d
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"@sentry/node@npm:^7.28.1":
|
||||
version: 7.28.1
|
||||
resolution: "@sentry/node@npm:7.28.1"
|
||||
dependencies:
|
||||
"@sentry/core": "npm:7.28.1"
|
||||
"@sentry/types": "npm:7.28.1"
|
||||
"@sentry/utils": "npm:7.28.1"
|
||||
cookie: "npm:^0.4.1"
|
||||
https-proxy-agent: "npm:^5.0.0"
|
||||
lru_map: "npm:^0.3.3"
|
||||
tslib: "npm:^1.9.3"
|
||||
checksum: b4922d1f0a1b1e96cd73e5381871d0a2d20c4a05dd09f1cb9def6795c5fbe099b2e2b97025262cac595d19a42ebc82a34a8f9e59f87c0176e5206ae1f6377532
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"@sentry/tracing@npm:^7.28.1":
|
||||
version: 7.28.1
|
||||
resolution: "@sentry/tracing@npm:7.28.1"
|
||||
dependencies:
|
||||
"@sentry/core": "npm:7.28.1"
|
||||
"@sentry/types": "npm:7.28.1"
|
||||
"@sentry/utils": "npm:7.28.1"
|
||||
tslib: "npm:^1.9.3"
|
||||
checksum: be501ca9d727f4893121c208f80fa82589964970c5a01155ba1d24cfd7ebdb2a1d6e325ea5556f0747d16519631013315781ad1c178f8721e5eab77de2446b63
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"@sentry/types@npm:7.28.1":
|
||||
version: 7.28.1
|
||||
resolution: "@sentry/types@npm:7.28.1"
|
||||
checksum: 7dc6639cb7645c37bd8f759b60dbf2a149573b8a24dfb06baf7d7978f785e4635a65b3fb9e007f0eea56d33b543043fcfa1c1a376a83aa9824bb2d25be1a56dc
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"@sentry/utils@npm:7.28.1":
|
||||
version: 7.28.1
|
||||
resolution: "@sentry/utils@npm:7.28.1"
|
||||
dependencies:
|
||||
"@sentry/types": "npm:7.28.1"
|
||||
tslib: "npm:^1.9.3"
|
||||
checksum: a4b5f73db0e287e49b2eab5da80d6bbf1f6c7e11e1cc06ae06f49a9477d2b45de98310b143198207f3ae1fdd25ef76c90984eb99553a8308f6516e12c0c9c98c
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"@simplewebauthn/iso-webcrypto@npm:^7.0.1":
|
||||
version: 7.0.1
|
||||
resolution: "@simplewebauthn/iso-webcrypto@npm:7.0.1"
|
||||
|
@ -3192,7 +3137,6 @@ __metadata:
|
|||
"@aws-sdk/client-sns": "npm:^3.259.0"
|
||||
"@aws-sdk/client-sqs": "npm:^3.259.0"
|
||||
"@newrelic/winston-enricher": "npm:^4.0.1"
|
||||
"@sentry/node": "npm:^7.28.1"
|
||||
"@standardnotes/common": "workspace:*"
|
||||
"@standardnotes/domain-core": "workspace:^"
|
||||
"@standardnotes/domain-events": "workspace:*"
|
||||
|
@ -3227,7 +3171,6 @@ __metadata:
|
|||
resolution: "@standardnotes/api-gateway@workspace:packages/api-gateway"
|
||||
dependencies:
|
||||
"@newrelic/winston-enricher": "npm:^4.0.1"
|
||||
"@sentry/node": "npm:^7.28.1"
|
||||
"@standardnotes/domain-core": "workspace:^"
|
||||
"@standardnotes/domain-events": "workspace:*"
|
||||
"@standardnotes/domain-events-infra": "workspace:*"
|
||||
|
@ -3290,8 +3233,6 @@ __metadata:
|
|||
"@cbor-extract/cbor-extract-linux-arm64": "npm:^2.1.1"
|
||||
"@cbor-extract/cbor-extract-linux-x64": "npm:^2.1.1"
|
||||
"@newrelic/winston-enricher": "npm:^4.0.1"
|
||||
"@sentry/node": "npm:^7.28.1"
|
||||
"@sentry/tracing": "npm:^7.28.1"
|
||||
"@simplewebauthn/server": "npm:^7.0.1"
|
||||
"@simplewebauthn/typescript-types": "npm:^7.0.0"
|
||||
"@standardnotes/api": "npm:^1.25.3"
|
||||
|
@ -3503,7 +3444,6 @@ __metadata:
|
|||
"@aws-sdk/client-s3": "npm:^3.259.0"
|
||||
"@aws-sdk/client-sns": "npm:^3.259.0"
|
||||
"@aws-sdk/client-sqs": "npm:^3.259.0"
|
||||
"@sentry/node": "npm:^7.28.1"
|
||||
"@standardnotes/config": "npm:2.4.3"
|
||||
"@standardnotes/domain-core": "workspace:^"
|
||||
"@standardnotes/domain-events": "workspace:*"
|
||||
|
@ -3595,7 +3535,6 @@ __metadata:
|
|||
"@aws-sdk/client-s3": "npm:^3.259.0"
|
||||
"@aws-sdk/client-sqs": "npm:^3.259.0"
|
||||
"@newrelic/winston-enricher": "npm:^4.0.1"
|
||||
"@sentry/node": "npm:^7.28.1"
|
||||
"@standardnotes/api": "npm:^1.25.3"
|
||||
"@standardnotes/common": "workspace:^"
|
||||
"@standardnotes/domain-core": "workspace:^"
|
||||
|
@ -3639,7 +3578,6 @@ __metadata:
|
|||
"@aws-sdk/client-sns": "npm:^3.259.0"
|
||||
"@aws-sdk/client-sqs": "npm:^3.259.0"
|
||||
"@newrelic/winston-enricher": "npm:^4.0.1"
|
||||
"@sentry/node": "npm:^7.28.1"
|
||||
"@standardnotes/domain-core": "workspace:^"
|
||||
"@standardnotes/domain-events": "workspace:*"
|
||||
"@standardnotes/domain-events-infra": "workspace:*"
|
||||
|
@ -3693,7 +3631,6 @@ __metadata:
|
|||
"@lerna-lite/cli": "npm:^1.5.1"
|
||||
"@lerna-lite/list": "npm:^1.5.1"
|
||||
"@lerna-lite/run": "npm:^1.5.1"
|
||||
"@sentry/node": "npm:^7.28.1"
|
||||
"@types/jest": "npm:^29.1.1"
|
||||
"@types/newrelic": "npm:^9.13.0"
|
||||
"@types/node": "npm:^18.11.9"
|
||||
|
@ -3765,8 +3702,6 @@ __metadata:
|
|||
"@aws-sdk/client-sns": "npm:^3.259.0"
|
||||
"@aws-sdk/client-sqs": "npm:^3.259.0"
|
||||
"@newrelic/winston-enricher": "npm:^4.0.1"
|
||||
"@sentry/node": "npm:^7.28.1"
|
||||
"@sentry/tracing": "npm:^7.28.1"
|
||||
"@standardnotes/api": "npm:^1.25.3"
|
||||
"@standardnotes/common": "workspace:*"
|
||||
"@standardnotes/domain-core": "workspace:^"
|
||||
|
@ -3862,7 +3797,6 @@ __metadata:
|
|||
dependencies:
|
||||
"@aws-sdk/client-sqs": "npm:^3.259.0"
|
||||
"@newrelic/winston-enricher": "npm:^4.0.1"
|
||||
"@sentry/node": "npm:^7.28.1"
|
||||
"@standardnotes/api": "npm:^1.25.3"
|
||||
"@standardnotes/common": "workspace:^"
|
||||
"@standardnotes/domain-core": "workspace:^"
|
||||
|
@ -5950,13 +5884,6 @@ __metadata:
|
|||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"cookie@npm:^0.4.1":
|
||||
version: 0.4.2
|
||||
resolution: "cookie@npm:0.4.2"
|
||||
checksum: e2b0be16f59835785be50f5dfe076c26e81ab49c988a6290144444d0dfdf8192e82b0aa1857734b292567795e7af3f2c951d82e5036a2aacb15cd4a6681b5d49
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"core-util-is@npm:~1.0.0":
|
||||
version: 1.0.3
|
||||
resolution: "core-util-is@npm:1.0.3"
|
||||
|
@ -9014,13 +8941,6 @@ __metadata:
|
|||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"lru_map@npm:^0.3.3":
|
||||
version: 0.3.3
|
||||
resolution: "lru_map@npm:0.3.3"
|
||||
checksum: 356e840fb3fa884e0150272698f7647ee05fcb82641af4e1f5b6ef3e698e4ac999e03f8b8c4dded2be7a3dd164eb504d3cdbab523c90322e1770c190b40099a1
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"make-dir@npm:^2.1.0":
|
||||
version: 2.1.0
|
||||
resolution: "make-dir@npm:2.1.0"
|
||||
|
@ -12023,7 +11943,7 @@ __metadata:
|
|||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"tslib@npm:^1.11.1, tslib@npm:^1.8.1, tslib@npm:^1.9.3":
|
||||
"tslib@npm:^1.11.1, tslib@npm:^1.8.1":
|
||||
version: 1.14.1
|
||||
resolution: "tslib@npm:1.14.1"
|
||||
checksum: 441af59dc42ad4ae57140e62cb362369620c6076845c2c2b0ecc863c1d719ce24fdbc301e9053433fef43075e061bf84b702318ff1204b496a5bba10baf9eb9f
|
||||
|
|
Loading…
Add table
Reference in a new issue