Skip to content

Commit

Permalink
Daily crash pixel (#3751)
Browse files Browse the repository at this point in the history
Task/Issue URL: https://app.asana.com/0/414235014887631/1208908529122511/f
Tech Design URL:
CC:

Description:

This PR adds a daily crash pixel. This pixel was already triaged in December, but I lost track of it over the break.
  • Loading branch information
samsymons authored Jan 23, 2025
1 parent 4e343ab commit 62495e6
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 0 deletions.
1 change: 1 addition & 0 deletions DuckDuckGo/Application/AppDelegate.swift
Original file line number Diff line number Diff line change
Expand Up @@ -452,6 +452,7 @@ final class AppDelegate: NSObject, NSApplicationDelegate {
crashCollection.startAttachingCrashLogMessages { pixelParameters, payloads, completion in
pixelParameters.forEach { parameters in
PixelKit.fire(GeneralPixel.crash, withAdditionalParameters: parameters, includeAppVersionParameter: false)
PixelKit.fire(GeneralPixel.crashDaily, frequency: .legacyDaily)
}

guard let lastPayload = payloads.last else {
Expand Down
1 change: 1 addition & 0 deletions DuckDuckGo/CrashReports/Model/CrashReporter.swift
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ final class CrashReporter {
}

PixelKit.fire(GeneralPixel.crash)
PixelKit.fire(GeneralPixel.crashDaily, frequency: .legacyDaily)

promptPresenter.showPrompt(for: latest) {
guard let contentData = latest.contentData else {
Expand Down
4 changes: 4 additions & 0 deletions DuckDuckGo/Statistics/GeneralPixel.swift
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ import Configuration
enum GeneralPixel: PixelKitEventV2 {

case crash
case crashDaily
case crashOnCrashHandlersSetUp
case crashReportingSubmissionFailed
case crashReportCRCIDMissing
Expand Down Expand Up @@ -476,6 +477,9 @@ enum GeneralPixel: PixelKitEventV2 {
case .crash:
return "m_mac_crash"

case .crashDaily:
return "m_mac_crash_daily"

case .crashOnCrashHandlersSetUp:
return "m_mac_crash_on_handlers_setup"

Expand Down

0 comments on commit 62495e6

Please sign in to comment.