New plugin: Elastic APM integration

Hi all,

I briefly want to share a plugin we’ve been developing over the last few months.
Yesterday, the packages landed in nightly and support for the plugin was added to puppet modules so I thought it would be a good time to introduce foreman_supervisory_authority, a plug-in that integrates Foreman with the Elastic APM.

The plugin collects various performance data that can be visualizes in Kibana.

The APM might be useful to debug performance issues. E.g. it allows you to view all database requests that happen during a request and how much time was spent on them.

I’ve also written a plugin to integrate the APM with smart-proxy. But due to the ancient ruby version we’re using the ruby apm agent currently does not work in the environment we run smart-proxy. If we can this to work, it would be possible to correlate requests from core and the proxies.

Let me know if you find this useful.



Earlier this week @ehelms and I actually talked about this. It would be some effort, but it may be worth it to SCLize the proxy as well. Moving it to Ruby 2.5 would allow us to drop Ruby 2.0 and set the minimum version to 2.3 like Foreman itself (because that’s what we use on Debian Stretch and Ubuntu Xenial).

This is totally off topic, but we’re actually planning on running smart-proxy in a container. We’d then basically get a new ruby version for free. But SCLing the proxy would probably be good. Note, that there is already a version of the proxy running in SCL. If we could get rid of this workaround, it’d be a win im my opinion. Paying back technical debt is always a good idea.

Let’s go further off topic :slight_smile:

We’re actually looking into running that as a standalone process on Debian to match it everywhere. Perhaps @aruzicka could comment.

Very nice, thanks. I like the level of detail in SQL statements, this is really useful.

I will add to that Foreman can export similar telemetry data itself to any monitoring system which handles Prometheus or Statsd protocols. This is complementary to the Elastic APM integration in case you don’t use ELK stack.

Nice. The ruby elastic agent currently does not export the backtrace where the sql statement has occurred. This would be super useful to have as well.