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 {
1919 addGlobalEventProcessor ( ( event ) => {
2020 event . tags = event . tags ?? { } ;
2121
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 ' ;
2424
2525 return event ;
2626 } ) ;
Original file line number Diff line number Diff line change @@ -344,7 +344,7 @@ export namespace NATIVE {
344344
345345 nSentryOptions = SentryOptions . alloc ( ) . initWithDictDidFailWithError ( mutDict as any ) ;
346346
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
348348 nSentryOptions . beforeSend = ( event : SentryEvent ) => {
349349 const exception = event . exceptions ?. objectAtIndex ( 0 ) ;
350350 const exceptionvalue = exception ?. value ;
@@ -364,6 +364,7 @@ export namespace NATIVE {
364364 beforeSend ( event as any , null ) ;
365365 }
366366 setEventOriginTag ( event ) ;
367+
367368 return event ;
368369 } ;
369370 nSentryOptions . beforeBreadcrumb = ( breadcrumb ) => {
@@ -413,7 +414,7 @@ export namespace NATIVE {
413414 }
414415
415416 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 ) ;
417418 }
418419 export async function fetchNativeDeviceContexts ( ) {
419420 if ( ! enableNative ) {
You can’t perform that action at this time.
0 commit comments