In this article, you will learn how to install and setup the ADOT Collector for traditional Linux environments. Applications running on EC2 will use the ADOT Collector to send their Observability data.
AWS Distro for OpenTelemetry Collector (ADOT Collector) is an AWS supported version of the upstream OpenTelemetry Collector and is distributed by Amazon. It supports the selected components from the OpenTelemetry community. It is fully compatible with AWS computing platforms including EC2, ECS, and EKS. It enables customers to send telemetry data to AWS CloudWatch Metrics, Traces, and Logs backends as well as the other supported backends.
Download the RPM Package
- Login on Amazon Linux 2 EC2 host and install ADOT Collector RPM package (stable version):
rpm -Uvh https://aws-otel-collector.s3.amazonaws.com/amazon_linux/amd64/latest/aws-otel-collector.rpm
- (Optional) Download the package and verify the integrity before install
wget https://aws-otel-collector.s3.amazonaws.com/amazon_linux/amd64/latest/aws-otel-collector.rpm
wget https://aws-otel-collector.s3.amazonaws.com/aws-otel-collector.gpg
sudo rpm --import aws-otel-collector.gpg
rpm --checksig aws-otel-collector.rpm
If the package is verified correctly, you'll see output similar to:
aws-otel-collector.rpm: digests signatures OK
However, if you see output like:
aws-otel-collector.rpm: digests SIGNATURES NOT OK
You should stop, and try download the rpm package from the official source again.
Setup the service
Now, let's create the YAML file to setup the ADOT Collector before start the Linux service daemon.
vim /opt/aws/aws-otel-collector/etc/config.yaml
extensions:
health_check:
receivers:
otlp:
protocols:
grpc:
endpoint: 0.0.0.0:4317
http:
endpoint: 0.0.0.0:4318
exporters:
awsxray:
awsemf:
processors:
batch/traces:
timeout: 1s
send_batch_size: 50
batch/metrics:
timeout: 60s
service:
pipelines:
traces:
receivers: [otlp]
exporters: [awsxray]
metrics:
receivers: [otlp]
exporters: [awsemf]
After creating the config file, now let's setup the OTEL as Linux service.
$ systemctl enable aws-otel-collector
Created symlink from /etc/systemd/system/multi-user.target.wants/aws-otel-collector.service to /etc/systemd/system/aws-otel-collector.service.
$ systemctl start aws-otel-collector
$ systemctl status aws-otel-collector
aws-otel-collector.service - ADOT Collector
Loaded: loaded (/etc/systemd/system/aws-otel-collector.service; enabled; vendor preset: disabled)
Active: **active** (running) since Fri 2024-09-13 19:21:50 UTC; 5s ago
Main PID: 15987 (aws-otel-collec)
CGroup: /system.slice/aws-otel-collector.service
└─15987 /opt/aws/aws-otel-collector/bin/aws-otel-collector --config /opt/aws/aws-otel-collector/etc/config.yaml
Sep 13 19:21:50 ip-172-31-17-169.us-west-2.compute.internal aws-otel-collector[15987]: 2024-09-13T19:21:50.174Z info service@v0.102.1/telemetry.go:96 Servi...ormal"}
Sep 13 19:21:50 ip-172-31-17-169.us-west-2.compute.internal aws-otel-collector[15987]: 2024-09-13T19:21:50.180Z warn awsemfexporter@v0.102.0/emf_exporter.go:75 th...
Sep 13 19:21:50 ip-172-31-17-169.us-west-2.compute.internal aws-otel-collector[15987]: 2024-09-13T19:21:50.181Z info service@v0.102.1/service.go:180 Starti...PU": 1}
Sep 13 19:21:50 ip-172-31-17-169.us-west-2.compute.internal aws-otel-collector[15987]: 2024-09-13T19:21:50.181Z info extensions/extensions.go:34 Starting e...ions...
Sep 13 19:21:50 ip-172-31-17-169.us-west-2.compute.internal aws-otel-collector[15987]: 2024-09-13T19:21:50.181Z warn internal@v0.102.1/warning.go:42 Using the 0.0...
Sep 13 19:21:50 ip-172-31-17-169.us-west-2.compute.internal aws-otel-collector[15987]: 2024-09-13T19:21:50.182Z info otlpreceiver@v0.102.1/otlp.go:102 Star...:4317"}
Sep 13 19:21:50 ip-172-31-17-169.us-west-2.compute.internal aws-otel-collector[15987]: 2024-09-13T19:21:50.183Z warn internal@v0.102.1/warning.go:42 Using the 0.0...
Sep 13 19:21:50 ip-172-31-17-169.us-west-2.compute.internal aws-otel-collector[15987]: 2024-09-13T19:21:50.184Z info otlpreceiver@v0.102.1/otlp.go:152 Star...:4318"}
Sep 13 19:21:50 ip-172-31-17-169.us-west-2.compute.internal aws-otel-collector[15987]: 2024-09-13T19:21:50.184Z info service@v0.102.1/service.go:206 Everyt...g data.
Sep 13 19:21:50 ip-172-31-17-169.us-west-2.compute.internal aws-otel-collector[15987]: 2024-09-13T19:21:50.184Z warn localhostgate/featuregate.go:63 The default e...
Hint: Some lines were ellipsized, use -l to show in full.
You should see active/running status in the log.
As a industry standard, applications using OpenTelemetry will forward data to OTEL receivers thought HTTP or gRPC.
For additional details about AWS OTEL, use the official doc as reference: https://aws-otel.github.io/