Refactor monitoring instrumentation code across modules

The monitoring instrumentation methodology has been simplified for both Baselime and Sentry providers by aligning their registration functions and error handling processes. Specifically, function names have been standardized to 'registerInstrumentation' and handling for the absence of the INSTRUMENTATION_SERVICE_NAME environment variable is now conducted within these functions. In addition, the MONITORING_INSTRUMENTATION_PROVIDER variable has been renamed to MONITORING_PROVIDER.
This commit is contained in:
giancarlo
2024-04-15 14:30:23 +08:00
parent 07ff9a7f8e
commit e75fcfc750
5 changed files with 31 additions and 31 deletions

View File

@@ -15,8 +15,7 @@ export async function register() {
'@kit/monitoring/instrumentation'
);
// Register monitoring instrumentation based on the
// MONITORING_INSTRUMENTATION_PROVIDER environment variable.
// Register monitoring instrumentation based on the MONITORING_PROVIDER environment variable.
return registerMonitoringInstrumentation();
}
}