APM for workers

Hi there,

our workers are getting more and more complicated which makes it hard for us to profile the performance. Especially subrequests, time it takes to read from KV and cache are topics we have to tackle.
Can you recommend a APM which works well with workers? We’re using sentry for error logging, but haven’t found a solution to log performance metrics. It should ideally instrument the code automatically. I did some research but all tools I’ve found are laid out for node.js when it comes to js and thus are not useable in workers.

Thanks a lot!

Alex

On the dashboard you have the new feature of Metrics.

I use it for optimization, also LogDNA on every worker that is spawned.

Give your feedback to Cloudflare Workers Team, they might build something around your request.

1 Like

Hi thanks for the suggestion, I’m thinking more about a featureset like new relic or elastic APM
Sadly these are not working with workers as they require a nodejs environment. Does something like this exist for workers?

Thanks and all the best

Alex

I’ve asked both our Cloudflare rep and our New Relic for a New Relic Agent that works in the Service Worker environment. In my mind, the key features are

  • Accept a Trace from the browser agent via headers and add a Span
  • Write custom events to New Relic
  • Write custom metrics to New Relic
  • Capture errors and report them to the New Relic Errors Inbox

I’m happy to contribute to an open-source agent, but I haven’t been able to find much documentation on the New Relic API that we’d use.