11import { VERSION } from '@angular/core' ;
22import type { BrowserOptions } from '@sentry/browser' ;
3- import { SDK_VERSION , defaultIntegrations , init as browserInit , setContext } from '@sentry/browser' ;
4- import type { SdkMetadata } from '@sentry/types ' ;
3+ import { defaultIntegrations , init as browserInit , setContext } from '@sentry/browser' ;
4+ import { applySdkMetadata } from '@sentry/core ' ;
55import { logger } from '@sentry/utils' ;
66
77import { IS_DEBUG_BUILD } from './flags' ;
@@ -11,7 +11,6 @@ import { IS_DEBUG_BUILD } from './flags';
1111 */
1212export function init ( options : BrowserOptions ) : void {
1313 const opts = {
14- _metadata : { } as SdkMetadata ,
1514 // Filter out TryCatch integration as it interferes with our Angular `ErrorHandler`:
1615 // TryCatch would catch certain errors before they reach the `ErrorHandler` and thus provide a
1716 // lower fidelity error than what `SentryErrorHandler` (see errorhandler.ts) would provide.
@@ -24,16 +23,7 @@ export function init(options: BrowserOptions): void {
2423 ...options ,
2524 } ;
2625
27- opts . _metadata . sdk = opts . _metadata . sdk || {
28- name : 'sentry.javascript.angular-ivy' ,
29- packages : [
30- {
31- name : 'npm:@sentry/angular-ivy' ,
32- version : SDK_VERSION ,
33- } ,
34- ] ,
35- version : SDK_VERSION ,
36- } ;
26+ applySdkMetadata ( opts , 'angular-ivy' ) ;
3727
3828 checkAndSetAngularVersion ( ) ;
3929 browserInit ( opts ) ;
0 commit comments