ECS EC2 Collection Agent - Configure
This guide covers configuring your daemon service after installation, verifying data flow, and setting up application data collection.
Prerequisites
Before configuring, ensure you have:
- Completed the installation steps
- Daemon service running on your ECS cluster
- Access to SigNoz Cloud or self-hosted instance
Verify Data Collection
Log into your SigNoz instance and check that ECS infrastructure metrics and logs are being received.
To visualize ECS data, import pre-built dashboards:
Import these in the Dashboards section of SigNoz.
Send Data from Applications
In this section, we will see how to send data from applications deployed in ECS to SigNoz Cloud using Daemon Service we created in the previous section.
Step 1: Add OpenTelemetry Instrumentation to your Application
To add OpenTelemetry instrumentation to your application, you can follow the docs here.
This step include adding the OpenTelemetry SDK as well as the initialization code to your application codebase and rebuilding the application container image.
Step 2: Add Entrypoint to your Application Container
We need to add an entrypoint to the application container to set the OTEL_EXPORTER_OTLP_ENDPOINT
environment variable to the endpoint of the daemon service. Such that the application container can send data to the daemon container running in the same host.
Method 1: Updating entrypoint in task definition
We need to obtain the endpoint or IP address of the instance on which the task is running. We can do this by querying the metadata service of the instance. For EC2, the metadata service is available at 169.254.169.254
.
The entryPoint
will look like:
{
"entryPoint": [
"sh",
"-c",
"export OTEL_EXPORTER_OTLP_ENDPOINT=\"http://$(curl http://169.254.169.254/latest/meta-data/local-ipv4):4317\"; <Application Startup Commands>"
],
"command": [],
}
- Replace
<Application Startup Commands>
with the commands to start your application.
3. Add Service Name of your Application
To add the service name of your application, you need to set the OTEL_RESOURCE_ATTRIBUTES
environment variable of the application container to service.name=<your-service-name>
.
In your task definition, you can add the following lines.
ContainerDefinitions:
- Name: <your-container-name>
Environment:
- Name: OTEL_RESOURCE_ATTRIBUTES
Value: service.name=<your-service-name>
In case of JSON task definition, you can add the following lines.
"containerDefinitions": [
{
"name": "<your-container-name>",
"environment": [
{
"name": "OTEL_RESOURCE_ATTRIBUTES",
"value": "service.name=<your-service-name>"
}
],
}
],
Last updated: August 13, 2025
Edit on GitHub