sentry-java icon indicating copy to clipboard operation
sentry-java copied to clipboard

Instrument WorkManager and Jobs

Open romtsn opened this issue 1 year ago • 3 comments

Description

We could instrument Android's WorkManager (and maybe other schedulers like AlarmManager or JobDispatcher) and power our Queues module.

Potential things we could capture:

  • Job Status
  • Job Start timestamp
  • Job Duration
  • Job Retries
  • Job Constraints (network, etc)
  • Job Frequency
  • Call Stack

Android Studio's Jobs/Task inspector for inspiration: Google Chrome 2024-07-15 22 04 41

romtsn avatar Jul 15 '24 20:07 romtsn

Let's investigate first:

  • If/how we can instrument the different work schedulers
  • How the queues module works under the hood and if the data model would the mobile use case (there's one queue per user vs. one queue per server instance)

markushi avatar Jul 17 '24 13:07 markushi

internal writeup on instrumentation options by @stefanosiano

kahest avatar Jul 19 '24 08:07 kahest

Since sentry's concept of queues doesn't match WorkManager very well, we could have breadcrumbs and Events (e.g. for failed jobs) as well.

markushi avatar Jul 24 '24 13:07 markushi