Tools for monitoring Background Tasks health in production

Hi everyone. In our project we have processing task (BGProcessingTask) that is being submitted when app goes to background, and the task request looks like this:

let request = BGProcessingTaskRequest(identifier: taskId)
request.requiresNetworkConnectivity = false
request.requiresExternalPower = true
let halfDay: TimeInterval = 12 * 60 * 60
request.earliestBeginDate = .init(timeIntervalSinceNow: halfDay)

The purpose of task is to check if there are any new photos in Photo Library, and if there are - process them in various ways. This process may be heavy and time consuming.

When a launched background task is successfully finished or expired, we re-submit same task in order to do same check+processing somewhen later. This way no foreground launch is required to do continuous checks.

My concern is: how do we know if we accidentally abuse the system? We don’t want to do anything “bad” because we want the system to continue launching our app forever.

Are there any kind of reports or analytics regarding background tasks “health” and status of our app in background tasks system?

We use our own analytics events to somehow figure out that everything works fine, but it’s hard to implement it to make use of.

Tools for monitoring Background Tasks health in production
 
 
Q