Reorganize monitoring package dependencies
The changes include some reorganization of the dependencies in the 'package.json' of the monitoring package and the web app, aimed to enhance readability. Also, a minor correction in the whitespace around "@sentry/nextjs" dependency version was made. Furthermore, code related to the monitoring instrumentation provider has been refactored for more readable error handling.
This commit is contained in:
@@ -27,11 +27,11 @@
|
|||||||
"@kit/email-templates": "workspace:^",
|
"@kit/email-templates": "workspace:^",
|
||||||
"@kit/i18n": "workspace:^",
|
"@kit/i18n": "workspace:^",
|
||||||
"@kit/mailers": "workspace:^",
|
"@kit/mailers": "workspace:^",
|
||||||
|
"@kit/monitoring": "workspace:^",
|
||||||
"@kit/shared": "workspace:^",
|
"@kit/shared": "workspace:^",
|
||||||
"@kit/supabase": "workspace:^",
|
"@kit/supabase": "workspace:^",
|
||||||
"@kit/team-accounts": "workspace:^",
|
"@kit/team-accounts": "workspace:^",
|
||||||
"@kit/ui": "workspace:^",
|
"@kit/ui": "workspace:^",
|
||||||
"@kit/monitoring": "workspace:^",
|
|
||||||
"@radix-ui/react-icons": "^1.3.0",
|
"@radix-ui/react-icons": "^1.3.0",
|
||||||
"@supabase/ssr": "^0.1.0",
|
"@supabase/ssr": "^0.1.0",
|
||||||
"@supabase/supabase-js": "^2.42.0",
|
"@supabase/supabase-js": "^2.42.0",
|
||||||
|
|||||||
@@ -13,12 +13,12 @@
|
|||||||
".": "./src/index.ts"
|
".": "./src/index.ts"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
|
"@kit/baselime": "workspace:*",
|
||||||
"@kit/eslint-config": "workspace:*",
|
"@kit/eslint-config": "workspace:*",
|
||||||
"@kit/prettier-config": "workspace:*",
|
"@kit/prettier-config": "workspace:*",
|
||||||
|
"@kit/sentry": "workspace:*",
|
||||||
"@kit/tailwind-config": "workspace:*",
|
"@kit/tailwind-config": "workspace:*",
|
||||||
"@kit/tsconfig": "workspace:*",
|
"@kit/tsconfig": "workspace:*"
|
||||||
"@kit/baselime": "workspace:*",
|
|
||||||
"@kit/sentry": "workspace:*"
|
|
||||||
},
|
},
|
||||||
"eslintConfig": {
|
"eslintConfig": {
|
||||||
"root": true,
|
"root": true,
|
||||||
|
|||||||
@@ -1,15 +1,15 @@
|
|||||||
/**
|
|
||||||
* @name DEFAULT_INSTRUMENTATION_PROVIDER
|
|
||||||
* @description Register monitoring instrumentation based on the MONITORING_INSTRUMENTATION_PROVIDER environment variable.
|
|
||||||
*/
|
|
||||||
const DEFAULT_INSTRUMENTATION_PROVIDER =
|
|
||||||
process.env.MONITORING_INSTRUMENTATION_PROVIDER;
|
|
||||||
|
|
||||||
enum InstrumentationProvider {
|
enum InstrumentationProvider {
|
||||||
Baselime = 'baselime',
|
Baselime = 'baselime',
|
||||||
Sentry = 'sentry',
|
Sentry = 'sentry',
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @name DEFAULT_INSTRUMENTATION_PROVIDER
|
||||||
|
* @description Register monitoring instrumentation based on the MONITORING_INSTRUMENTATION_PROVIDER environment variable.
|
||||||
|
*/
|
||||||
|
const DEFAULT_INSTRUMENTATION_PROVIDER = process.env
|
||||||
|
.MONITORING_INSTRUMENTATION_PROVIDER as InstrumentationProvider | undefined;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @name registerInstrumentation
|
* @name registerInstrumentation
|
||||||
* @description Register monitoring instrumentation based on the MONITORING_INSTRUMENTATION_PROVIDER environment variable.
|
* @description Register monitoring instrumentation based on the MONITORING_INSTRUMENTATION_PROVIDER environment variable.
|
||||||
@@ -39,8 +39,6 @@ export async function registerInstrumentation() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
default:
|
default:
|
||||||
throw new Error(
|
throw new Error(`Unknown instrumentation provider`);
|
||||||
`Unknown instrumentation provider: ${DEFAULT_INSTRUMENTATION_PROVIDER}`,
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user