Improve snackbar and fix sentry (#7181)
- Improve snackbar to enable displaying multi-line message (so far we only displayed the first few words which was very frustrating) - Followup on previous issue to enable tim@apple.dev on the demo workspace (prefilled automatically) - Fix sentry tracing which had been broken when migrating from v7 to v8
This commit is contained in:
29
packages/twenty-server/src/instrument.ts
Normal file
29
packages/twenty-server/src/instrument.ts
Normal file
@ -0,0 +1,29 @@
|
||||
import * as Sentry from '@sentry/nestjs';
|
||||
import { nodeProfilingIntegration } from '@sentry/profiling-node';
|
||||
|
||||
import { ExceptionHandlerDriver } from 'src/engine/core-modules/exception-handler/interfaces';
|
||||
import { WorkspaceCacheKeys } from 'src/engine/workspace-cache-storage/workspace-cache-storage.service';
|
||||
|
||||
if (process.env.EXCEPTION_HANDLER_DRIVER === ExceptionHandlerDriver.Sentry) {
|
||||
Sentry.init({
|
||||
environment: process.env.SENTRY_ENVIRONMENT,
|
||||
release: process.env.SENTRY_RELEASE,
|
||||
dsn: process.env.SENTRY_DSN,
|
||||
integrations: [
|
||||
// TODO: Redis integration doesn't seem to work - investigate why
|
||||
Sentry.redisIntegration({
|
||||
cachePrefixes: Object.values(WorkspaceCacheKeys).map(
|
||||
(key) => `engine:${key}:`,
|
||||
),
|
||||
}),
|
||||
Sentry.httpIntegration(),
|
||||
Sentry.expressIntegration(),
|
||||
Sentry.graphqlIntegration(),
|
||||
Sentry.postgresIntegration(),
|
||||
nodeProfilingIntegration(),
|
||||
],
|
||||
tracesSampleRate: 0.1,
|
||||
profilesSampleRate: 0.3,
|
||||
debug: process.env.DEBUG_MODE === 'true',
|
||||
});
|
||||
}
|
||||
Reference in New Issue
Block a user