scoutapp / scout_apm_node

ScoutAPM Agent for NodeJS. Supports Express and other frameworks
https://scoutapm.com
Other
8 stars 9 forks source link

Sending additional information for background jobs #288

Open sullman opened 3 years ago

sullman commented 3 years ago

The background jobs section of the UI has the queue name and latency shown, but for the jobs I've instrumented the queue name is always default and the latency is always 0.0. The docs don't seem to show how to set either of these when creating a background job.

Given the API, and the API of the core agent in particular, it seemed like the options are limited. Maybe a context added with a particular name could be interpreted as those attributes? But nothing that I tried was successful. When we use the ruby agent and sidekiq jobs we get that information, but ruby doesn't use the core agent and I didn't see an obvious analog for the annotations/metrics. If it's at all possible via the core agent, I'm happy to do any extra work in the custom instrumentation for our background jobs.