# APM for Cloudflare Workers?

**URL:** <https://discuss.elastic.co/t/apm-for-cloudflare-workers/156766>\
**Category:** APM\
**Created:** [November 15, 2018, 1:08am UTC](https://discuss.elastic.co/t/apm-for-cloudflare-workers/156766 "2018-11-15T01:08:14Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Luisvsm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/luisvsm/32/37657_2.png) [@Luisvsm](https://discuss.elastic.co/u/Luisvsm)\
**Post date:** [November 15, 2018, 1:08am UTC](https://discuss.elastic.co/t/apm-for-cloudflare-workers/156766/1 "2018-11-15T01:08:14Z")

</div>

I have been investigating APM for Workers over the last couple of days as [their solution is very build your own](https://developers.cloudflare.com/workers/writing-workers/debugging-tips/) at the moment.

I'm fairly new to the Elastic stack as well so I may have missed something but I thought my learnings might still be valuable for anyone reading this going forward.

Cloudflare Workers uses a modified version of Web Workers to run sandboxed javascript from what I can tell. They also mention using existing NodeJS packages using [NPM and Webpack](https://developers.cloudflare.com/workers/writing-workers/using-npm-modules/).

So my first throught was to bundle up the [NodeJS APM agent](https://github.com/elastic/apm-agent-nodejs), but that didn't work so well as we are missing core NodeJS libraries like [async hooks](https://nodejs.org/api/async_hooks.html), [js](https://nodejs.org/api/fs.html) and [net](https://nodejs.org/api/net.html) etc.

Next I had a look at the [base JavaScript agent](https://github.com/elastic/apm-agent-js-base) which I thought may do part of what I wanted but it's a tool aimed at user monitor not servers, and after packaging it up with Webpack and deploying, I received an APM: Platform is not supported! console log, so that's out.

I think after all that I'm going to fall back on some basic [HTTP input](https://www.elastic.co/guide/en/logstash/current/plugins-inputs-http.html) with Logstash.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [December 5, 2018, 9:10pm UTC](https://discuss.elastic.co/t/apm-for-cloudflare-workers/156766/2 "2018-12-05T21:10:21Z")

</div>

This topic was automatically closed 20 days after the last reply. New replies are no longer allowed.
