integration.js 1.0 KB

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