Elastic APM, Agent and Fleet for Django/Flask logs

I want to get the logs from applications (Django, Flask) to the Elastic APM server, but am struggling to make sense of it.

If I follow the documentation, it tells to setup APM server either as standalone or managed by Fleet. I go with Fleet.

Once Fleet is setup, it tells to install the Elastic Agent on my machine which I'd like to monitor. Once I setup, the Elastic Agent on my machine sends data like CPU usage, memory usage, etc. of my machine.

The other instruction is to install the elasticapm library and configure it in the app accordingly. The instructions call this as installing the agent.

Now it also says that only a single agent is installed per host. But it feels we need to setup elasticapm for every Django/Flask app.

So how does this all tie up?
And how is the elastic agent installed on the machine relate to elasticapm installed on the app?

If you want to monitor a Python application you need to use the Python APM agent, you can find the documentation at Introduction | APM Python Agent Reference [6.x] | Elastic.
You need to install it and configure it in each application because it's a standard python package.

The elastic-agent as you already find out works at the host level so it's a similar role but for different things.

2 Likes