Skip to content

Commit 124c00a

Browse files
committed
Expose internally, temporarily
1 parent 23bf8e2 commit 124c00a

File tree

2 files changed

+23
-0
lines changed

2 files changed

+23
-0
lines changed

firebase-crashlytics/src/main/java/com/google/firebase/crashlytics/FirebaseCrashlytics.java

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -371,6 +371,16 @@ public void setCustomKeys(@NonNull CustomKeysAndValues keysAndValues) {
371371
core.setCustomKeys(keysAndValues.keysAndValues);
372372
}
373373

374+
/**
375+
* Sets an internal key and value that are associated with subsequent fatal and non-fatal reports.
376+
*
377+
* @param key A unique key
378+
* @param value A value to be associated with the given key
379+
*/
380+
public void setInternalKey(@NonNull String key, String value) {
381+
core.setInternalKey(key, value);
382+
}
383+
374384
// region Unsent report management.
375385

376386
/**

firebase-crashlytics/src/main/java/com/google/firebase/crashlytics/internal/common/CrashlyticsCore.java

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -349,6 +349,19 @@ public void setCustomKeys(Map<String, String> keysAndValues) {
349349
controller.setCustomKeys(keysAndValues);
350350
}
351351

352+
/**
353+
* Set a value to be associated with a given key for your crash data. The key/value pairs will be
354+
* reported with any crash that occurs in this session. A maximum of 64 key/value pairs can be
355+
* stored for any type. New keys added over that limit will be ignored. Keys and values are
356+
* trimmed ({@link String#trim()}), and keys or values that exceed 1024 characters will be
357+
* truncated.
358+
*
359+
* @throws NullPointerException if key is null.
360+
*/
361+
public void setInternalKey(String key, String value) {
362+
controller.setInternalKey(key, value);
363+
}
364+
352365
// endregion
353366

354367
// region Package-protected getters

0 commit comments

Comments
 (0)