1- import { convertIntegrationFnToClass , getCurrentScope } from '@sentry/core' ;
1+ import { convertIntegrationFnToClass , defineIntegration , getCurrentScope } from '@sentry/core' ;
22import type { Client , EventEnvelope , Integration , IntegrationClass , IntegrationFn , Transaction } from '@sentry/types' ;
33import type { Profile } from '@sentry/types/src/profiling' ;
44import { logger } from '@sentry/utils' ;
@@ -18,7 +18,7 @@ import {
1818
1919const INTEGRATION_NAME = 'BrowserProfiling' ;
2020
21- const browserProfilingIntegration = ( ( ) => {
21+ const _browserProfilingIntegration = ( ( ) => {
2222 return {
2323 name : INTEGRATION_NAME ,
2424 // TODO v8: Remove this
@@ -102,6 +102,8 @@ const browserProfilingIntegration = (() => {
102102 } ;
103103} ) satisfies IntegrationFn ;
104104
105+ export const browserProfilingIntegration = defineIntegration ( _browserProfilingIntegration ) ;
106+
105107/**
106108 * Browser profiling integration. Stores any event that has contexts["profile"]["profile_id"]
107109 * This exists because we do not want to await async profiler.stop calls as transaction.finish is called
@@ -110,9 +112,13 @@ const browserProfilingIntegration = (() => {
110112 * integration less reliable as we might be dropping profiles when the cache is full.
111113 *
112114 * @experimental
115+ * @deprecated Use `browserProfilingIntegration()` instead.
113116 */
114117// eslint-disable-next-line deprecation/deprecation
115118export const BrowserProfilingIntegration = convertIntegrationFnToClass (
116119 INTEGRATION_NAME ,
117120 browserProfilingIntegration ,
118121) as IntegrationClass < Integration & { setup : ( client : Client ) => void } > ;
122+
123+ // eslint-disable-next-line deprecation/deprecation
124+ export type BrowserProfilingIntegration = typeof BrowserProfilingIntegration ;
0 commit comments