index.js 1019 B

1234567891011121314151617181920212223242526272829
  1. Object.defineProperty(exports, '__esModule', { value: true });
  2. const tracing = require('@sentry-internal/tracing');
  3. const utils = require('@sentry/utils');
  4. /**
  5. * Automatically detects and returns integrations that will work with your dependencies.
  6. */
  7. function autoDiscoverNodePerformanceMonitoringIntegrations() {
  8. const loadedIntegrations = tracing.lazyLoadedNodePerformanceMonitoringIntegrations
  9. .map(tryLoad => {
  10. try {
  11. return tryLoad();
  12. } catch (_) {
  13. return undefined;
  14. }
  15. })
  16. .filter(integration => !!integration) ;
  17. if (loadedIntegrations.length === 0) {
  18. utils.logger.warn('Performance monitoring integrations could not be automatically loaded.');
  19. }
  20. // Only return integrations where their dependencies loaded successfully.
  21. return loadedIntegrations.filter(integration => !!integration.loadDependency());
  22. }
  23. exports.autoDiscoverNodePerformanceMonitoringIntegrations = autoDiscoverNodePerformanceMonitoringIntegrations;
  24. //# sourceMappingURL=index.js.map