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:
@@ -13,12 +13,12 @@
|
||||
".": "./src/index.ts"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@kit/baselime": "workspace:*",
|
||||
"@kit/eslint-config": "workspace:*",
|
||||
"@kit/prettier-config": "workspace:*",
|
||||
"@kit/sentry": "workspace:*",
|
||||
"@kit/tailwind-config": "workspace:*",
|
||||
"@kit/tsconfig": "workspace:*",
|
||||
"@kit/baselime": "workspace:*",
|
||||
"@kit/sentry": "workspace:*"
|
||||
"@kit/tsconfig": "workspace:*"
|
||||
},
|
||||
"eslintConfig": {
|
||||
"root": true,
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
"./config/edge": "./src/config/sentry.server.edge.ts"
|
||||
},
|
||||
"dependencies": {
|
||||
"@sentry/nextjs":"^7.109.0",
|
||||
"@sentry/nextjs": "^7.109.0",
|
||||
"@sentry/opentelemetry-node": "^7.109.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
|
||||
@@ -1 +1 @@
|
||||
export * from './instrumentation';
|
||||
export * from './instrumentation';
|
||||
|
||||
@@ -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 {
|
||||
Baselime = 'baselime',
|
||||
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
|
||||
* @description Register monitoring instrumentation based on the MONITORING_INSTRUMENTATION_PROVIDER environment variable.
|
||||
@@ -39,8 +39,6 @@ export async function registerInstrumentation() {
|
||||
}
|
||||
|
||||
default:
|
||||
throw new Error(
|
||||
`Unknown instrumentation provider: ${DEFAULT_INSTRUMENTATION_PROVIDER}`,
|
||||
);
|
||||
throw new Error(`Unknown instrumentation provider`);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user