|
1 |
| -# Setting Up Container Insights for your EKS Cluster |
| 1 | +# CloudWatch Application Signals & Container Insights for your EKS Cluster |
2 | 2 |
|
3 |
| -This example deploys CloudWatch Observability EKS add-on on an exisiting Amazon EKS cluster, which enables Container Insights enhanced observability for Amazon EKS and CloudWatch Application Signals by default. |
| 3 | +This example deploys CloudWatch Observability EKS add-on on an exisiting Amazon |
| 4 | +EKS cluster, which enables Container Insights enhanced observability for Amazon |
| 5 | +EKS and CloudWatch Application Signals by default. |
4 | 6 |
|
5 | 7 | 1. Enables the CloudWatch Observability Add-on on EKS using the IAM service account role
|
6 | 8 | 2. Creates an IAM Service Linked role for enabling Application Signals
|
@@ -53,36 +55,68 @@ Simply run this command to deploy the example
|
53 | 55 | terraform apply
|
54 | 56 | ```
|
55 | 57 |
|
56 |
| -## Enabling Application Signals (preview) for your services |
57 |
| -CloudWatch Application Signals (preview) is currenlty supported for **Java** applications running on your Amazon EKS cluster. |
| 58 | +## Enabling Application Signals for your services |
58 | 59 |
|
59 |
| -Next, you have to update your Application to `Configure application metrics and trace sampling`. For this, you must add an annotation to a manifest YAML in your cluster. Adding this annotation auto-instruments the application to send metrics, traces, and logs to Application Signals. You have two options for the annotation: |
| 60 | +Amazon CloudWatch Application Signals is a new integrated native APM experience |
| 61 | +in AWS. CloudWatch Application Signals supports **Java** and **Python** applications |
| 62 | +running on your Amazon EKS cluster. |
| 63 | + |
| 64 | +Next, you have to update your Application to |
| 65 | +`Configure application metrics and trace sampling`. For this, you must add an |
| 66 | +annotation to a manifest YAML in your cluster. Adding this annotation |
| 67 | +auto-instruments the application to send metrics, traces, and logs to |
| 68 | +Application Signals. You have two options for the annotation: |
60 | 69 |
|
61 | 70 | 1. **Annotate Workload** auto-instruments a single workload in the cluster.
|
62 | 71 | - Paste the below line into the PodTemplate section of the workload manifest.
|
63 | 72 | ```
|
64 |
| - annotations: instrumentation.opentelemetry.io/inject-java: "true" |
| 73 | + apiVersion: apps/v1 |
| 74 | + kind: Deployment |
| 75 | + spec: |
| 76 | + template: |
| 77 | + metadata: |
| 78 | + # add this annotation under the pod template metadata of the services deployment YAML you want to monitor |
| 79 | + annotations: |
| 80 | + instrumentation.opentelemetry.io/inject-java: "true" |
| 81 | + instrumentation.opentelemetry.io/inject-python: "true" |
| 82 | + ... |
65 | 83 | ```
|
66 | 84 | - In your terminal, enter `kubectl apply -f your_deployment_yaml` to apply the change.
|
67 | 85 |
|
68 | 86 | 2. **Annotate Namespace** auto-instruments all workloads deployed in the selected namespace.
|
69 | 87 | - Paste the below line into the metadata section of the namespace manifest.
|
70 | 88 | ```
|
71 | 89 | annotations: instrumentation.opentelemetry.io/inject-java: "true"
|
| 90 | + apiVersion: apps/v1 |
| 91 | + kind: Namespace |
| 92 | + metadata: |
| 93 | + name: <your_namespace> |
| 94 | + # add this annotation under metadata of the namespace manifest you want to monitor |
| 95 | + annotations: |
| 96 | + instrumentation.opentelemetry.io/inject-java: "true" |
| 97 | + instrumentation.opentelemetry.io/inject-python: "true" |
| 98 | + ... |
72 | 99 | ```
|
73 | 100 | - In your terminal, enter `kubectl apply -f your_namespace_yaml` to apply the change.
|
74 | 101 | - In your terminal, enter a command to restart all pods in the namespace. An example command to restart deployment workloads is `kubectl rollout restart deployment -n namespace_name`
|
75 | 102 |
|
76 | 103 | ## Visualization of Container Insights data
|
77 | 104 |
|
78 |
| -After `terraform apply` is successful, open your Amazon CloudWatch console in the same region as your EKS cluster, then from the left hand side choose `Insights -> Container Insights`, there choose the `EKS` from the drop down and you will see the metrics shown on the dashboard: |
| 105 | +After `terraform apply` is successful, open your Amazon CloudWatch console in |
| 106 | +the same region as your EKS cluster, then from the left hand side choose |
| 107 | +`Insights -> Container Insights`, there choose the `EKS` from the drop down and |
| 108 | +you will see the metrics shown on the dashboard: |
79 | 109 |
|
80 | 110 | <img width="1345" alt="image" src="https://github.com/ruchimo/terraform-aws-observability-accelerator/assets/106240341/31686b29-8ec2-46ff-a266-ebfa1de9768a">
|
81 | 111 |
|
82 | 112 |
|
83 |
| -## Visualization of CloudWatch Application Signals (preview) data |
| 113 | +## Visualization of CloudWatch Application Signals data |
84 | 114 |
|
85 |
| -After enabling your Application to pass metrics and traces by following [the steps provided above](#enabling-application-signals-preview-for-your-services), open your Amazon CloudWatch console in the same region as your EKS cluster, then from the left hand side choose `Application Signals -> Services` and you will see the metrics shown on the sample dashboard below: |
| 115 | +After enabling your Application to pass metrics and traces by following |
| 116 | +[the steps provided above](#enabling-application-signals-for-your-services), |
| 117 | +open your Amazon CloudWatch console in the same region as your EKS cluster, |
| 118 | +then from the left hand side choose `Application Signals -> Services` and you |
| 119 | +will see the metrics shown on the sample dashboard below: |
86 | 120 |
|
87 | 121 | <img width="1321" alt="image" src="https://github.com/ruchimo/terraform-aws-observability-accelerator/assets/106240341/2fccf784-6560-45a9-8be0-4e843c9653f1">
|
88 | 122 |
|
|
0 commit comments