@@ -96,7 +96,7 @@ export class SentryReactService {
9696 } ) ;
9797 }
9898
99- static captureException ( error : any , context ?: any ) {
99+ static captureException ( error : Error | unknown , context ?: Record < string , unknown > ) {
100100 if ( ! SentryConfigService . isEnabled ( ) ) return ;
101101
102102 return Sentry . withScope ( ( scope ) => {
@@ -107,7 +107,7 @@ export class SentryReactService {
107107 } ) ;
108108 }
109109
110- static captureMessage ( message : string , level : Sentry . SeverityLevel = 'info' , context ?: any ) {
110+ static captureMessage ( message : string , level : Sentry . SeverityLevel = 'info' , context ?: Record < string , unknown > ) {
111111 if ( ! SentryConfigService . isEnabled ( ) ) return ;
112112
113113 return Sentry . withScope ( ( scope ) => {
@@ -124,7 +124,7 @@ export class SentryReactService {
124124 Sentry . setUser ( user ) ;
125125 }
126126
127- static addBreadcrumb ( message : string , category ?: string , data ?: any ) {
127+ static addBreadcrumb ( message : string , category ?: string , data ?: Record < string , unknown > ) {
128128 if ( ! SentryConfigService . isEnabled ( ) ) return ;
129129
130130 Sentry . addBreadcrumb ( {
@@ -141,7 +141,7 @@ export class SentryReactService {
141141 Sentry . setTag ( key , value ) ;
142142 }
143143
144- static setContext ( key : string , context : any ) {
144+ static setContext ( key : string , context : Record < string , unknown > ) {
145145 if ( ! SentryConfigService . isEnabled ( ) ) return ;
146146
147147 Sentry . setContext ( key , context ) ;
@@ -154,7 +154,7 @@ export class SentryReactService {
154154 return Sentry . startSpan ( {
155155 name,
156156 op : op || 'custom' ,
157- } ) ;
157+ } , ( span ) => span ) ;
158158 }
159159
160160 static showReportDialog ( eventId ?: string ) {
0 commit comments