-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'trunk' into andy/issue-20360
- Loading branch information
Showing
8 changed files
with
119 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
6 changes: 3 additions & 3 deletions
6
.../java/com/automattic/android/tracks/crashlogging/CrashLoggingOkHttpInterceptorProvider.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,13 @@ | ||
package com.automattic.android.tracks.crashlogging | ||
|
||
import io.sentry.android.okhttp.SentryOkHttpInterceptor | ||
import io.sentry.okhttp.SentryOkHttpInterceptor | ||
import okhttp3.Interceptor | ||
|
||
object CrashLoggingOkHttpInterceptorProvider { | ||
fun createInstance(requestFormatter: RequestFormatter): Interceptor = | ||
SentryOkHttpInterceptor { span, request, _ -> | ||
SentryOkHttpInterceptor(captureFailedRequests = false, beforeSpan = { span, request, _ -> | ||
span.apply { | ||
description = requestFormatter.formatRequestUrl(request) | ||
} | ||
} | ||
}) | ||
} |
22 changes: 22 additions & 0 deletions
22
AutomatticTracks/src/main/java/com/automattic/android/tracks/crashlogging/JsException.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
package com.automattic.android.tracks.crashlogging | ||
|
||
data class JsException( | ||
val type: String, | ||
val message: String, | ||
var stackTrace: List<JsExceptionStackTraceElement>, | ||
val context: Map<String, Any>, | ||
val tags: Map<String, String>, | ||
val isHandled: Boolean, | ||
val handledBy: String | ||
) | ||
|
||
data class JsExceptionStackTraceElement( | ||
val fileName: String?, | ||
val lineNumber: Int?, | ||
val colNumber: Int?, | ||
val function: String | ||
) | ||
|
||
interface JsExceptionCallback { | ||
fun onReportSent(sent: Boolean) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters