Skip to content

Commit

Permalink
Prep for pixels to detect crash reporting failures
Browse files Browse the repository at this point in the history
  • Loading branch information
jdjackson committed Dec 9, 2024
1 parent c56f50f commit 2f921b1
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
4 changes: 2 additions & 2 deletions Sources/Crashes/CrashCollection.swift
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,6 @@ public final class CrashCollection {
for payload in processedData {
let result = await self.crashSender.send(payload, crcid: self.crcidManager.crcid)
self.crcidManager.handleCrashSenderResult(result: result.result, response: result.response)

}
didFinishHandlingResponse()
}
Expand Down Expand Up @@ -233,11 +232,12 @@ public class CRCIDManager {
Logger.general.debug("Crash Collection - Received matching value for CRCID: \(receivedCRCID), no update necessary")
}
} else {
// TODO: Pixel: crashreporting_crcid-missing
Logger.general.debug("Crash Collection - No value for CRCID header: \(CRCIDManager.crcidKey), clearing local crcid value if present")
crcid = nil
}
case .failure(let failure):
// TODO: Is it worth sending a pixel for this case, so that we can monitor for missing crash reports?
// TODO: Pixel: crashreporting_submission-failed
Logger.general.debug("Crash Collection - Sending Crash Report: failed (\(failure))")
}
}
Expand Down
1 change: 0 additions & 1 deletion Sources/Crashes/CrashReportSender.swift
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,6 @@ public final class CrashReportSender: CrashReportSending {

Logger.general.debug("CrashReportSender: Awaiting session data")
let task = session.dataTask(with: request) { data, response, error in
// TODO: Consider pixels for failures that mean we may have lost crash info?
if let response = response as? HTTPURLResponse {
Logger.general.debug("CrashReportSender: Received HTTP response code: \(response.statusCode)")
if response.statusCode == 200 {
Expand Down

0 comments on commit 2f921b1

Please sign in to comment.