integration.js 1.2 KB

1234567891011121314151617181920212223242526272829303132333435
  1. Object.defineProperty(exports, '__esModule', { value: true });
  2. const integration = require('../integration.js');
  3. const browserAggregator = require('./browser-aggregator.js');
  4. const INTEGRATION_NAME = 'MetricsAggregator';
  5. const _metricsAggregatorIntegration = (() => {
  6. return {
  7. name: INTEGRATION_NAME,
  8. // TODO v8: Remove this
  9. setupOnce() {}, // eslint-disable-line @typescript-eslint/no-empty-function
  10. setup(client) {
  11. client.metricsAggregator = new browserAggregator.BrowserMetricsAggregator(client);
  12. },
  13. };
  14. }) ;
  15. const metricsAggregatorIntegration = integration.defineIntegration(_metricsAggregatorIntegration);
  16. /**
  17. * Enables Sentry metrics monitoring.
  18. *
  19. * @experimental This API is experimental and might having breaking changes in the future.
  20. * @deprecated Use `metricsAggegratorIntegration()` instead.
  21. */
  22. // eslint-disable-next-line deprecation/deprecation
  23. const MetricsAggregator = integration.convertIntegrationFnToClass(
  24. INTEGRATION_NAME,
  25. metricsAggregatorIntegration,
  26. ) ;
  27. exports.MetricsAggregator = MetricsAggregator;
  28. exports.metricsAggregatorIntegration = metricsAggregatorIntegration;
  29. //# sourceMappingURL=integration.js.map