3232import org .jetbrains .annotations .NotNull ;
3333
3434import java .lang .ref .WeakReference ;
35+ import java .util .ArrayList ;
3536import java .util .HashMap ;
37+ import java .util .List ;
3638import java .util .Map ;
3739
3840import javax .annotation .Nullable ;
@@ -107,10 +109,10 @@ public void initCrashReportingNativeSupport(String apiKey, String version, Strin
107109 return ;
108110 }
109111
110- RaygunClient .init (reactContext , apiKey , version );
111- RaygunClient .enableCrashReporting ();
112- RaygunClient .setOnBeforeSend (new OnBeforeSendHandler ());
113- RaygunClient .setCustomCrashReportingEndpoint (customCrashReportingEndpoint );
112+ RaygunClient .INSTANCE . init (reactContext , apiKey , version );
113+ RaygunClient .INSTANCE . enableCrashReporting ();
114+ RaygunClient .INSTANCE . setOnBeforeSend (new OnBeforeSendHandler ());
115+ RaygunClient .INSTANCE . setCustomCrashReportingEndpoint (customCrashReportingEndpoint );
114116
115117 crashReportingInitialized = true ;
116118 }
@@ -350,7 +352,7 @@ public void setUser(ReadableMap userObj) {
350352 userObj .getString ("fullName" ),
351353 userObj .getString ("email" ));
352354
353- RaygunClient .setUser (user );
355+ RaygunClient .INSTANCE . setUser (user );
354356 }
355357
356358 /**
@@ -360,7 +362,11 @@ public void setUser(ReadableMap userObj) {
360362 */
361363 @ ReactMethod
362364 public void setTags (ReadableArray tags ) {
363- RaygunClient .setTags (tags .toArrayList ());
365+ List <String > tagList = new ArrayList <>();
366+ for (int i = 0 ; i < tags .size (); i ++) {
367+ tagList .add (tags .getString (i ));
368+ }
369+ RaygunClient .INSTANCE .setTags (tagList );
364370 }
365371
366372 /**
@@ -371,7 +377,7 @@ public void setTags(ReadableArray tags) {
371377 */
372378 @ ReactMethod
373379 public void setCustomData (ReadableMap customData ) {
374- RaygunClient .setCustomData (customData .toHashMap ());
380+ RaygunClient .INSTANCE . setCustomData (customData .toHashMap ());
375381 }
376382
377383 /**
@@ -403,15 +409,15 @@ public void recordBreadcrumb(ReadableMap breadcrumb) {
403409 .customData (customData .toHashMap ())
404410 .build ();
405411
406- RaygunClient .recordBreadcrumb (breadcrumbMessage );
412+ RaygunClient .INSTANCE . recordBreadcrumb (breadcrumbMessage );
407413 }
408414
409415 /**
410416 * Clear the breadcrumbs.
411417 */
412418 @ ReactMethod
413419 public void clearBreadcrumbs () {
414- RaygunClient .clearBreadcrumbs ();
420+ RaygunClient .INSTANCE . clearBreadcrumbs ();
415421 }
416422 //#endregion--------------------------------------------------------------------------------------
417423
0 commit comments