rittenhop-dev/versions/5.94.2/node_modules/@sentry/node/esm/tracing/index.js

28 lines
931 B
JavaScript
Raw Normal View History

2024-09-23 19:40:12 -04:00
import { lazyLoadedNodePerformanceMonitoringIntegrations } from '@sentry-internal/tracing';
import { logger } from '@sentry/utils';
/**
* Automatically detects and returns integrations that will work with your dependencies.
*/
function autoDiscoverNodePerformanceMonitoringIntegrations() {
const loadedIntegrations = lazyLoadedNodePerformanceMonitoringIntegrations
.map(tryLoad => {
try {
return tryLoad();
} catch (_) {
return undefined;
}
})
.filter(integration => !!integration) ;
if (loadedIntegrations.length === 0) {
logger.warn('Performance monitoring integrations could not be automatically loaded.');
}
// Only return integrations where their dependencies loaded successfully.
return loadedIntegrations.filter(integration => !!integration.loadDependency());
}
export { autoDiscoverNodePerformanceMonitoringIntegrations };
//# sourceMappingURL=index.js.map