-
Notifications
You must be signed in to change notification settings - Fork 578
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add an overload to FirebaseCrashlytics.recordException to attach additional custom key value pairs #6528
base: main
Are you sure you want to change the base?
Conversation
Javadoc Changes:--- /home/runner/diff/original/firebase-kotlindoc/android/com/google/firebase/crashlytics/FirebaseCrashlytics.html 2024-11-25 22:25:30.381115193 +0000
+++ /home/runner/diff/modified/firebase-kotlindoc/android/com/google/firebase/crashlytics/FirebaseCrashlytics.html 2024-11-25 22:22:59.501695586 +0000
@@ -79,6 +79,13 @@
<tr>
<td><code>void</code></td>
<td>
+ <div><code><a href="/docs/reference/android/com/google/firebase/crashlytics/FirebaseCrashlytics.html#recordException(java.lang.Throwable,java.util.Map<java.lang.String,java.lang.String>)">recordException</a>(<br> @<a href="https://developer.android.com/reference/kotlin/androidx/annotation/NonNull.html">NonNull</a> <a href="https://developer.android.com/reference/kotlin/java/lang/Throwable.html">Throwable</a> throwable,<br> @<a href="https://developer.android.com/reference/kotlin/androidx/annotation/NonNull.html">NonNull</a> <a href="https://developer.android.com/reference/kotlin/java/util/Map.html">Map</a><<a href="https://developer.android.com/reference/kotlin/java/lang/String.html">String</a>, <a href="https://developer.android.com/reference/kotlin/java/lang/String.html">String</a>> userInfo<br>)</code></div>
+ <p>Records a non-fatal report to send to Crashlytics.</p>
+ </td>
+ </tr>
+ <tr>
+ <td><code>void</code></td>
+ <td>
<div><code><a href="/docs/reference/android/com/google/firebase/crashlytics/FirebaseCrashlytics.html#sendUnsentReports()">sendUnsentReports</a>()</code></div>
<p>If automatic data collection is disabled, this method queues up all the reports on a device to send to Crashlytics.</p>
</td>
@@ -333,6 +340,38 @@
</td>
</tr>
</tbody>
+ </table>
+ </div>
+ </div>
+ <div class="api-item"><a name="recordException(java.lang.Throwable, java.util.Map<java.lang.String,java.lang.String>)"></a><a name="recordException-java.lang.Throwable-java.util.Map<java.lang.String,java.lang.String>-"></a><a name="recordexception"></a>
+ <h3 class="api-name" id="recordException(java.lang.Throwable,java.util.Map<java.lang.String,java.lang.String>)">recordException</h3>
+ <pre class="api-signature no-pretty-print">public void <a href="/docs/reference/android/com/google/firebase/crashlytics/FirebaseCrashlytics.html#recordException(java.lang.Throwable,java.util.Map<java.lang.String,java.lang.String>)">recordException</a>(<br> @<a href="https://developer.android.com/reference/kotlin/androidx/annotation/NonNull.html">NonNull</a> <a href="https://developer.android.com/reference/kotlin/java/lang/Throwable.html">Throwable</a> throwable,<br> @<a href="https://developer.android.com/reference/kotlin/androidx/annotation/NonNull.html">NonNull</a> <a href="https://developer.android.com/reference/kotlin/java/util/Map.html">Map</a><<a href="https://developer.android.com/reference/kotlin/java/lang/String.html">String</a>, <a href="https://developer.android.com/reference/kotlin/java/lang/String.html">String</a>> userInfo<br>)</pre>
+ <p>Records a non-fatal report to send to Crashlytics.</p>
+ <div class="devsite-table-wrapper">
+ <table class="responsive">
+ <colgroup>
+ <col width="40%">
+ <col>
+ </colgroup>
+ <thead>
+ <tr>
+ <th colspan="100%">Parameters</th>
+ </tr>
+ </thead>
+ <tbody class="list">
+ <tr>
+ <td><code>@<a href="https://developer.android.com/reference/kotlin/androidx/annotation/NonNull.html">NonNull</a> <a href="https://developer.android.com/reference/kotlin/java/lang/Throwable.html">Throwable</a> throwable</code></td>
+ <td>
+ <p>a <code><a href="https://developer.android.com/reference/kotlin/java/lang/Throwable.html">Throwable</a></code> to be recorded as a non-fatal event.</p>
+ </td>
+ </tr>
+ <tr>
+ <td><code>@<a href="https://developer.android.com/reference/kotlin/androidx/annotation/NonNull.html">NonNull</a> <a href="https://developer.android.com/reference/kotlin/java/util/Map.html">Map</a><<a href="https://developer.android.com/reference/kotlin/java/lang/String.html">String</a>, <a href="https://developer.android.com/reference/kotlin/java/lang/String.html">String</a>> userInfo</code></td>
+ <td>
+ <p>a <code><a href="https://developer.android.com/reference/kotlin/java/util/Map.html">Map</a></code> to add key value pairs to be recorded with the non fatal exception.</p>
+ </td>
+ </tr>
+ </tbody>
</table>
</div>
</div> --- /home/runner/diff/original/firebase-kotlindoc/kotlin/com/google/firebase/crashlytics/FirebaseCrashlytics.html 2024-11-25 22:25:30.373115223 +0000
+++ /home/runner/diff/modified/firebase-kotlindoc/kotlin/com/google/firebase/crashlytics/FirebaseCrashlytics.html 2024-11-25 22:22:59.497695601 +0000
@@ -79,6 +79,13 @@
<tr>
<td><code><a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html">Unit</a></code></td>
<td>
+ <div><code><a href="/docs/reference/kotlin/com/google/firebase/crashlytics/FirebaseCrashlytics.html#recordException(java.lang.Throwable,java.util.Map<java.lang.String,java.lang.String>)">recordException</a>(<br> throwable: <a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-throwable/index.html">Throwable</a>,<br> userInfo: (<a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.collections/-mutable-map/index.html">Mutable</a>)<a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.collections/-map/index.html">Map</a><<a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html">String</a>!, <a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html">String</a>!><br>)</code></div>
+ <p>Records a non-fatal report to send to Crashlytics.</p>
+ </td>
+ </tr>
+ <tr>
+ <td><code><a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html">Unit</a></code></td>
+ <td>
<div><code><a href="/docs/reference/kotlin/com/google/firebase/crashlytics/FirebaseCrashlytics.html#sendUnsentReports()">sendUnsentReports</a>()</code></div>
<p>If automatic data collection is disabled, this method queues up all the reports on a device to send to Crashlytics.</p>
</td>
@@ -333,6 +340,38 @@
</td>
</tr>
</tbody>
+ </table>
+ </div>
+ </div>
+ <div class="api-item"><a name="recordException(java.lang.Throwable, java.util.Map<java.lang.String,java.lang.String>)"></a><a name="recordException-java.lang.Throwable-java.util.Map<java.lang.String,java.lang.String>-"></a><a name="recordexception"></a>
+ <h3 class="api-name" id="recordException(java.lang.Throwable,java.util.Map<java.lang.String,java.lang.String>)">recordException</h3>
+ <pre class="api-signature no-pretty-print">fun <a href="/docs/reference/kotlin/com/google/firebase/crashlytics/FirebaseCrashlytics.html#recordException(java.lang.Throwable,java.util.Map<java.lang.String,java.lang.String>)">recordException</a>(<br> throwable: <a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-throwable/index.html">Throwable</a>,<br> userInfo: (<a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.collections/-mutable-map/index.html">Mutable</a>)<a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.collections/-map/index.html">Map</a><<a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html">String</a>!, <a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html">String</a>!><br>): <a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html">Unit</a></pre>
+ <p>Records a non-fatal report to send to Crashlytics.</p>
+ <div class="devsite-table-wrapper">
+ <table class="responsive">
+ <colgroup>
+ <col width="40%">
+ <col>
+ </colgroup>
+ <thead>
+ <tr>
+ <th colspan="100%">Parameters</th>
+ </tr>
+ </thead>
+ <tbody class="list">
+ <tr>
+ <td><code>throwable: <a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-throwable/index.html">Throwable</a></code></td>
+ <td>
+ <p>a <code><a href="https://developer.android.com/reference/kotlin/java/lang/Throwable.html">Throwable</a></code> to be recorded as a non-fatal event.</p>
+ </td>
+ </tr>
+ <tr>
+ <td><code>userInfo: (<a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.collections/-mutable-map/index.html">Mutable</a>)<a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.collections/-map/index.html">Map</a><<a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html">String</a>!, <a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html">String</a>!></code></td>
+ <td>
+ <p>a <code><a href="https://developer.android.com/reference/kotlin/java/util/Map.html">Map</a></code> to add key value pairs to be recorded with the non fatal exception.</p>
+ </td>
+ </tr>
+ </tbody>
</table>
</div>
</div> |
Vertex AI Mock Responses Check
|
Coverage Report 1Affected ProductsNo changes between base commit (04bfe55) and merge commit (d5e4a5e).Test Logs |
The public api surface has changed for the subproject firebase-crashlytics: Please update the api.txt files for the subprojects being affected by this change by running ./gradlew ${subproject}:generateApiTxtFile. Also perform a major/minor bump accordingly. |
Size Report 1Affected Products
Test Logs |
The public api surface has changed for the subproject firebase-crashlytics: Please update the api.txt files for the subprojects being affected by this change by running ./gradlew ${subproject}:generateApiTxtFile. Also perform a major/minor bump accordingly. |
1 similar comment
The public api surface has changed for the subproject firebase-crashlytics: Please update the api.txt files for the subprojects being affected by this change by running ./gradlew ${subproject}:generateApiTxtFile. Also perform a major/minor bump accordingly. |
This PR adds a method
public void recordException(@NonNull Throwable throwable, Map<String, String> userInfo)
as an overload to the existingrecordException
method in Crashlytics to allow attaching additional custom keys to the specific event. This restores parity w/ the behaviour on iOS.Details:
Additionally:
sessionId
andtimestamp
attached to non fatal events.