Where to install Elastic Agent relative to .NET app container?

Hi, I have several cloud-hosted .NET Core apps, each running in a docker container, each using the Elastic.Apm.NetCoreAll package. I have ECK running elsewhere with a Fleet Server, and need to add Fleet Agents for my .NET Core apps now. In Kibana I click "Fleet" > "Add Agent" and get instructions to "Install Elastic Agent on your host". Where should the Elastic Agent(s) be installed?

A) Install agent inside each container and set the apps' ElasticApm.ServerUrl to "http:// localhost:8200"?

B) Run Elastic Agent in a container of its own and set the ElasticApm.ServerUrl to "AGENT_CONTAINER_URL:8200"? If this is the case, should there be a single Elastic Agent or one for each .NET app?

C) Install Elastic Agent on the host cloud instance, outside of any container, and set ElasticApm.ServerUrl to "HOST_URL:8200"?

Hi @jbrasee Welcome to the community!

Take a look here / at the whole page

Typically if you are running ECK w/ Fleet you install the APM Integration/ Server in the same Elastic Agent that has the Fleet Server...as shown in the diagram No need to put it in every container, you just need Network connectivity.

There are other options and the flow chart at the bottom runs through some of them.

You can run the APM server at "the edge" if you want, but that's just more the manage perhaps in your case.

Let us know if that makes sense

Little clarification just in case

Elastic APM agents (little "a") ship traces / APM data

Elastic Agent (capital E capital A) is an agent that can support multiple integrations to collect a variety of telemetry.

It turns out Fleet and APM Server integration are 2 special integrations of Elastic Agent as shown in the diagram

Yup a bit confusing namewise but hopefully that helps