File tree Expand file tree Collapse file tree 1 file changed +13
-5
lines changed
firebase-crashlytics/src/main/java/com/google/firebase/crashlytics Expand file tree Collapse file tree 1 file changed +13
-5
lines changed Original file line number Diff line number Diff line change @@ -211,20 +211,28 @@ public void recordException(@NonNull Throwable throwable) {
211211 /**
212212 * Records a non-fatal report to send to Crashlytics.
213213 *
214+ * <p>Combined with app level custom keys, the event is restricted to a maximum of 64 key/value
215+ * pairs. New keys beyond that limit are ignored. Keys or values that exceed 1024 characters are
216+ * truncated.
217+ *
218+ * <p>The values of event keys override the values of app level custom keys if they're identical.
219+ *
214220 * @param throwable a {@link Throwable} to be recorded as a non-fatal event.
215- * @param userInfo a {@link Map} to add key value pairs to be recorded with the non fatal exception.
221+ * @param customKeys a {@link Map<String, String>} containing key value pairs to be associated
222+ * with the non fatal exception, in addition to the global custom keys.
216223 */
217- public void recordException (@ NonNull Throwable throwable , @ NonNull Map <String , String > userInfo ) {
224+ public void recordException (
225+ @ NonNull Throwable throwable , @ NonNull Map <String , String > customKeys ) {
218226 if (throwable == null ) { // Users could call this with null despite the annotation.
219227 Logger .getLogger ().w ("A null value was passed to recordException. Ignoring." );
220228 return ;
221229 }
222230
223- if (userInfo == null ) { // It's possible to set this to null even with the annotation.
224- userInfo = Map .of ();
231+ if (customKeys == null ) { // It's possible to set this to null even with the annotation.
232+ customKeys = Map .of ();
225233 }
226234
227- core .logException (throwable , userInfo );
235+ core .logException (throwable , customKeys );
228236 }
229237
230238 /**
You can’t perform that action at this time.
0 commit comments