11import { VERSION } from '@angular/core' ;
22import type { BrowserOptions } from '@sentry/browser' ;
3- import { getDefaultIntegrations } from '@sentry/browser' ;
4- import { SDK_VERSION , init as browserInit , setContext } from '@sentry/browser' ;
5- import type { SdkMetadata } from '@sentry/types' ;
3+ import { getDefaultIntegrations , init as browserInit , setContext } from '@sentry/browser' ;
4+ import { applySdkMetadata } from '@sentry/core' ;
65import { logger } from '@sentry/utils' ;
76
87import { IS_DEBUG_BUILD } from './flags' ;
@@ -12,7 +11,6 @@ import { IS_DEBUG_BUILD } from './flags';
1211 */
1312export function init ( options : BrowserOptions ) : void {
1413 const opts = {
15- _metadata : { } as SdkMetadata ,
1614 // Filter out TryCatch integration as it interferes with our Angular `ErrorHandler`:
1715 // TryCatch would catch certain errors before they reach the `ErrorHandler` and thus provide a
1816 // lower fidelity error than what `SentryErrorHandler` (see errorhandler.ts) would provide.
@@ -25,16 +23,7 @@ export function init(options: BrowserOptions): void {
2523 ...options ,
2624 } ;
2725
28- opts . _metadata . sdk = opts . _metadata . sdk || {
29- name : 'sentry.javascript.angular-ivy' ,
30- packages : [
31- {
32- name : 'npm:@sentry/angular-ivy' ,
33- version : SDK_VERSION ,
34- } ,
35- ] ,
36- version : SDK_VERSION ,
37- } ;
26+ applySdkMetadata ( opts , 'angular-ivy' ) ;
3827
3928 checkAndSetAngularVersion ( ) ;
4029 browserInit ( opts ) ;
0 commit comments