Observing AWS ECS deployments
DeveloperSteve
Posted on September 6, 2022
It’s no secret that application containerization has revolutionized the digital world as we know it by providing a transient gateway into elastic infrastructure that can scale and grow as needed. Where traditional virtualization was all about creating a single homogenous entity, containers are self-contained units of software, able to run in just about any environment, making them extremely portable.
To look at it another way, and to build on a popular quote with ancient origins, “With great scale comes the need for great observability”. Tracing and monitoring can help surface these issues while observing the resources being utilized by your containers.
Here’s how to get started on observing and monitoring your ECS clusters with Lumigo.
Like with all excellent adventures, there are a few things we need to prepare before we begin our journey. Have an AWS account set up and at least one ECS cluster deployed—extra points for also having a few Lambdas or other traceable services. To find out how Lumigo can help with your Lambda traces.
The other thing you will need is a Lumigo account that is connected to your AWS. It’s easy to do, free, and only takes a few minutes.
This is where things get REALLY interesting.
By adding the Lumigo tracers into our application you can gain even more insight into the inner workings of your ECS container applications.
To get started all you need to do is add a library, a few lines of code, and some environmental variables. This will slightly vary depending on what your language and codebase look like, but first, let’s check out some libraries.
Lumigo has some open-source libraries for getting trace information from your application. It currently supports Python and NodeJS languages.
If you are using another language for your application, you can still connect your trace information, but you may need a few additional steps and should use one of the OpenTelemetry collector libraries.
Install the library with your nominated package manager and reference the library from within your application. Again, this may vary slightly depending on how your application is structured.
OTEL_SERVICE_NAME
This sets the application name on the service application traces and should reflect something specific to the application being traced within this container.
LUMIGO_TRACER_TOKEN
This helps identify your traces to your Lumigo instance. It can be found by visiting Settings and then Tracing from your Lumigo dashboard.
Now we will be able to see a lot more information from that ECS cluster application, right down to the application level and beyond. Clicking through from the services button on the cluster overview page will whisk you away to the Explore page with a resource filter set.
Posted on September 6, 2022
Join Our Newsletter. No Spam, Only the good stuff.
Sign up to receive the latest update from our blog.