File tree Expand file tree Collapse file tree 2 files changed +5
-4
lines changed Expand file tree Collapse file tree 2 files changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -19,8 +19,8 @@ export class EventOrigin implements Integration {
19
19
addGlobalEventProcessor ( ( event ) => {
20
20
event . tags = event . tags ?? { } ;
21
21
22
- event . tags [ 'event.origin' ] = 'javascript' ;
23
- event . tags [ 'event.environment' ] = 'javascript ' ;
22
+ event . tags [ 'event.origin' ] = __ANDROID__ ? 'android' : __IOS__ ? 'ios' : 'javascript' ;
23
+ event . tags [ 'event.environment' ] = 'nativescript ' ;
24
24
25
25
return event ;
26
26
} ) ;
Original file line number Diff line number Diff line change @@ -344,7 +344,7 @@ export namespace NATIVE {
344
344
345
345
nSentryOptions = SentryOptions . alloc ( ) . initWithDictDidFailWithError ( mutDict as any ) ;
346
346
347
- // before send right now is never called when we send the envelope
347
+ // before send right now is never called when we send the envelope. Only on native crash
348
348
nSentryOptions . beforeSend = ( event : SentryEvent ) => {
349
349
const exception = event . exceptions ?. objectAtIndex ( 0 ) ;
350
350
const exceptionvalue = exception ?. value ;
@@ -364,6 +364,7 @@ export namespace NATIVE {
364
364
beforeSend ( event as any , null ) ;
365
365
}
366
366
setEventOriginTag ( event ) ;
367
+
367
368
return event ;
368
369
} ;
369
370
nSentryOptions . beforeBreadcrumb = ( breadcrumb ) => {
@@ -413,7 +414,7 @@ export namespace NATIVE {
413
414
}
414
415
415
416
function dictToJSON ( dict ) {
416
- return JSON . parse ( NSString . alloc ( ) . initWithDataEncoding ( NSJSONSerialization . dataWithJSONObjectOptionsError ( dict , 0 ) , NSUTF8StringEncoding ) as any ) ;
417
+ return JSON . parse ( NSString . alloc ( ) . initWithDataEncoding ( NSJSONSerialization . dataWithJSONObjectOptionsError ( dict , 0 as any ) , NSUTF8StringEncoding ) as any ) ;
417
418
}
418
419
export async function fetchNativeDeviceContexts ( ) {
419
420
if ( ! enableNative ) {
You can’t perform that action at this time.
0 commit comments