Skip to content

Commit 4bc2812

Browse files
author
Gordon Pham-Nguyen
committed
Add documentation for EMF auto-detection
1 parent 63e4b59 commit 4bc2812

File tree

2 files changed

+30
-5
lines changed

2 files changed

+30
-5
lines changed

README.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,9 @@ Generate CloudWatch metrics embedded within structured log events. The embedded
1616

1717
- **Generate custom metrics across compute environments**
1818

19-
- Easily generate custom metrics from Lambda functions without requiring custom batching code, making blocking network requests or relying on third-party software.
20-
- Other compute environments (EC2, On-prem, ECS, EKS, and other container environments) are supported by installing the [CloudWatch Agent](https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/CloudWatch_Embedded_Metric_Format_Generation_CloudWatch_Agent.html).
19+
- Easily generate custom metrics from Lambda functions without requiring custom batching code, making blocking network requests or relying on third-party software.
20+
- Other compute environments (EC2, On-prem, ECS, EKS, and other container environments) are supported by installing the [CloudWatch Agent](https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/CloudWatch_Embedded_Metric_Format_Generation_CloudWatch_Agent.html).
21+
- Examples can be found in [examples/README.md](examples/README.md)
2122

2223
- **Link metrics to high cardinality context**
2324

examples/README.md

Lines changed: 27 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,32 @@ Run the example:
2828
```
2929
./examples/agent/bin/run.sh
3030
```
31-
32-
## FireLens on ECS EC2
31+
32+
## Docker
33+
34+
With Docker images, using the `awslogs` log driver will send your container logs to CloudWatch Logs. All you have to do is write to STDOUT and your EMF logs will be processed.
35+
36+
[Official Docker documentation for `awslogs` driver](https://docs.docker.com/config/containers/logging/awslogs/)
37+
38+
## ECS and Fargate
39+
40+
With ECS and Fargate, you can use the `awslogs` log driver to have your logs sent to CloudWatch Logs on your behalf. After configuring your task to use the `awslogs` log driver, you may write your EMF logs to STDOUT and they will be processed.
41+
42+
[ECS documentation on `awslogs` log driver](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/using_awslogs.html)
43+
44+
## Fluent Bit and Fluentd
45+
46+
Fluent Bit can be used to collect logs and push them to CloudWatch Logs. After configuring your task to use the `awslogs` log driver, you may write your EMF logs to STDOUT and they will be processed.
47+
48+
[Getting Started with Fluent Bit](https://docs.fluentbit.io/manual/installation/getting-started-with-fluent-bit)
49+
50+
[Amazon CloudWatch output plugin for Fluent Bit](https://docs.fluentbit.io/manual/pipeline/outputs/cloudwatch)
51+
52+
## Previous Examples
53+
54+
The following examples are still valid examples and can still be used, but they predate the release of the EMF auto-detection feature.
55+
56+
### FireLens on ECS EC2
3357

3458
You can deploy the example by running the following:
3559

@@ -55,7 +79,7 @@ aws s3api create-bucket --bucket <bucket-name> --region <region>
5579
<ecs-service-name>
5680
```
5781

58-
## FireLens on ECS Fargate
82+
### FireLens on ECS Fargate
5983

6084
For running on Fargate, s3 file option is not supported for Fluent-bit config. Hence, we need to build the fluent-bit custom config image and then use its reference in our Firelens container definition.
6185

0 commit comments

Comments
 (0)