AWS Distro for OpenTelemetry
Understanding your Configurations
Understanding your Configurations
We have 5 different configurations that you can select from, depending on your monitoring service destination. See below for details.
AMP Configurations for metrics
Amazon Managed Services for Prometheus (AMP) allows us to easily establish both monitoring and alerting services for container environments on EKS, ECS, Lambda, and many other AWS services. Specifically, AMP collects metrics in the form of time series data from containers & nodes and stores them. Metrics information is stored with the timestamp at which it was recorded and can contain many forms of data that the user chooses to include such as spans, query duration, etc.
Here is a list of metrics that we can collect using the java-sample-app and AMP configuration.
Metrics | Definition |
---|---|
http_server_active_requests | HTTP requests are messages sent by the client to initiate an action on the server |
http_server_duration_count | The average amount of time it takes for a queried metric to deliver |
queuesize | Size of HTTP queue requests that provides time for new connections to become available on the server, |
runtime_jvm_gc_count | Java virtual machine runtime metrics |
runtime_jvm_gc_time | Java virtual machine runtime metrics |
runtime_jvm_memory_area | Java virtual machine runtime metrics |
runtime_jvm_memory_pool | Java virtual machine runtime metrics |
spansExportedByExporter | Number of spans that are exported by the exporter |
spansSeenByExporter | Number of spans that are seen by the exporter |
Configuring dimensions
While visualizing the Amazon Managed Services for Prometheus (AMP) metrics in Amazon Managed Services for Grafana (AMG), you can query and select a metric using the metric browser. When deploying your configuration, you will have multiple metrics coming from different tasks and clusters. As a result, you can use the following dimensions in your query to identify and analyze the metrics related to specific task or cluster. Below are are the possible dimensions with a description of what each dimension mean.
Metric Dimension | Definition |
---|---|
aws_ecs_cluster_name | ECS Cluster Name |
aws_ecs_service_name | ECS Service Name |
aws_ecs_task_arn | Task ARN ID |
aws_ecs_task_family | Task Family name |
aws_ecs_task_id | Task ID |
aws_ecs_task_known_status | ECS Task Status |
aws_ecs_task_launch_type | ECS Task launch type |
aws_ecs_task_version | ECS Task family revision number |
cloud_account_id | AWS Account ID |
cloud_availability_zone | AWS Availability Zone |
cloud_region | AWS region |
Below is an example of a configuration which utilizes ECS and AMP to output metrics for you to visualize on a service such as AMG.
1extensions:2 health_check:3 sigv4auth:4
5receivers:6 otlp:7 protocols:8 grpc:9 endpoint: 0.0.0.0:431710 http:11 endpoint: 0.0.0.0:431812 awsecscontainermetrics:13
14processors:15 batch/metrics:16 timeout: 60s17 resourcedetection:18 detectors:19 - env20 - system21 - ecs22 - ec223 filter:24 metrics:25 include:26 match_type: strict27 metric_names:28 - ecs.task.memory.reserved29 - ecs.task.memory.utilized30 - ecs.task.cpu.reserved31 - ecs.task.cpu.utilized32 - ecs.task.network.rate.rx33 - ecs.task.network.rate.tx34 - ecs.task.storage.read_bytes35 - ecs.task.storage.write_bytes36 - container.duration37
38exporters:39 prometheusremotewrite:40 endpoint: $AWS_PROMETHEUS_ENDPOINT41 auth:42 authenticator: sigv4auth43 resource_to_telemetry_conversion:44 enabled: true45
46service:47 pipelines:48 metrics/application:49 receivers: [otlp]50 processors: [resourcedetection, batch/metrics]51 exporters: [prometheusremotewrite]52 metrics:53 receivers: [awsecscontainermetrics]54 processors: [filter]55 exporters: [prometheusremotewrite]56
57 extensions: [health_check, sigv4auth]
Amazon CloudWatch Configuration for Application metrics
Amazon CloudWatch collects and processes raw data from Amazon ECS into readable, near real-time metrics. It receives time-series metrics and trace data in real time. Our receiver generates data points and Amazon CloudWatch presents this data within the Amazon CloudWatch console. With Amazon CloudWatch, we able to display more data points for you to observe, one sample count in Amazon CloudWatch is the aggregate of multiple data points in one minute.
Here is a list of metrics that you can receive from your exporter by using the java-sample-app and Amazon CloudWatch Configuration.
Metrics | Definition |
---|---|
http_server_active_requests | HTTP requests are messages sent by the client to initiate an action on the server |
http_server_duration_count | The average amount of time it takes for a queried metric to deliver |
queuesize | Size of HTTP queue requests that provides time for new connections to become available on the server, |
runtime_jvm_gc_count | Java virtual machine runtime metrics |
runtime_jvm_gc_time | Java virtual machine runtime metrics |
runtime_jvm_memory_area | Java virtual machine runtime metrics |
runtime_jvm_memory_pool | Java virtual machine runtime metrics |
spansExportedByExporter | Number of spans that are exported by the exporter |
spansSeenByExporter | Number of spans that are seen by the exporter |
Below is an example of a configuration which utilizes ECS and Amazon CloudWatch.
1extensions:2 health_check:3
4receivers:5 otlp:6 protocols:7 grpc:8 endpoint: 0.0.0.0:43179 http:10 endpoint: 0.0.0.0:431811
12processors:13 batch/metrics:14 timeout: 60s15 resourcedetection:16 detectors:17 - env18 - ecs19 - ec220 resource:21 attributes:22 - key: TaskDefinitionFamily23 from_attribute: aws.ecs.task.family24 action: insert25 - key: aws.ecs.task.family26 action: delete27 - key: InstanceId28 from_attribute: host.id29 action: insert30 - key: host.id31 action: delete32 - key: TaskARN33 from_attribute: aws.ecs.task.arn34 action: insert35 - key: aws.ecs.task.arn36 action: delete37 - key: TaskDefinitionRevision38 from_attribute: aws.ecs.task.revision39 action: insert40 - key: aws.ecs.task.revision41 action: delete42 - key: LaunchType43 from_attribute: aws.ecs.launchtype44 action: insert45 - key: aws.ecs.launchtype46 action: delete47 - key: ClusterARN48 from_attribute: aws.ecs.cluster.arn49 action: insert50 - key: aws.ecs.cluster.arn51 action: delete52 - key: cloud.provider53 action: delete54 - key: cloud.platform55 action: delete56 - key: cloud.account.id57 action: delete58 - key: cloud.region59 action: delete60 - key: cloud.availability_zone61 action: delete62 - key: aws.log.group.names63 action: delete64 - key: aws.log.group.arns65 action: delete66 - key: aws.log.stream.names67 action: delete68 - key: host.image.id69 action: delete70 - key: host.name71 action: delete72 - key: host.type73 action: delete74
75exporters:76 awsemf/application:77 namespace: ECS/AWSOTel/Application78 log_group_name: '/aws/ecs/application/metrics'79 dimension_rollup_option: NoDimensionRollup80 resource_to_telemetry_conversion:81 enabled: true82
83service:84 pipelines:85 metrics/application:86 receivers: [otlp]87 processors: [resourcedetection, resource, batch/metrics]88 exporters: [awsemf/application]89
90 extensions: [health_check]
X-Ray Configuration for traces
AWS X-Ray helps developers analyze and debug production, distributed applications, such as those built using a microservices architecture. With X-Ray, you can understand how your application and its underlying services are performing to identify and troubleshoot the root cause of performance issues and errors.
Using the X-Ray configuration, you can monitor application traces including the performance of API calls to other components or services. For any trace request to your application, you can see detailed information from not only the request and response, but also calls that your application makes to downstream AWS resources, micro-services, databases and HTTP web APIs.
1extensions:2 health_check:3
4receivers:5 otlp:6 protocols:7 grpc:8 endpoint: 0.0.0.0:43179 http:10 endpoint: 0.0.0.0:431811
12processors:13 batch/traces:14 timeout: 1s15 send_batch_size: 5016 resourcedetection:17 detectors:18 - env19 - system20 - ecs21 - ec222
23exporters:24 awsxray:25
26service:27 pipelines:28 traces:29 receivers: [otlp]30 processors: [resourcedetection, batch/traces]31 exporters: [awsxray]32
33 extensions: [health_check]
Amazon CloudWatch and X-Ray Configuration for Metrics and Traces
By utilizing this configuration you will be able to see datapoints for both metrics and traces in Amazon CloudWatch and X-Ray.
1extensions:2 health_check:3
4receivers:5 otlp:6 protocols:7 grpc:8 endpoint: 0.0.0.0:43179 http:10 endpoint: 0.0.0.0:431811
12processors:13 batch/traces:14 timeout: 1s15 send_batch_size: 5016 batch/metrics:17 timeout: 60s18 resourcedetection:19 detectors:20 - env21 - ecs22 - ec223 resource:24 attributes:25 - key: TaskDefinitionFamily26 from_attribute: aws.ecs.task.family27 action: insert28 - key: aws.ecs.task.family29 action: delete30 - key: InstanceId31 from_attribute: host.id32 action: insert33 - key: host.id34 action: delete35 - key: TaskARN36 from_attribute: aws.ecs.task.arn37 action: insert38 - key: aws.ecs.task.arn39 action: delete40 - key: TaskDefinitionRevision41 from_attribute: aws.ecs.task.revision42 action: insert43 - key: aws.ecs.task.revision44 action: delete45 - key: LaunchType46 from_attribute: aws.ecs.launchtype47 action: insert48 - key: aws.ecs.launchtype49 action: delete50 - key: ClusterARN51 from_attribute: aws.ecs.cluster.arn52 action: insert53 - key: aws.ecs.cluster.arn54 action: delete55 - key: cloud.provider56 action: delete57 - key: cloud.platform58 action: delete59 - key: cloud.account.id60 action: delete61 - key: cloud.region62 action: delete63 - key: cloud.availability_zone64 action: delete65 - key: aws.log.group.names66 action: delete67 - key: aws.log.group.arns68 action: delete69 - key: aws.log.stream.names70 action: delete71 - key: host.image.id72 action: delete73 - key: host.name74 action: delete75 - key: host.type76 action: delete77
78exporters:79 awsxray:80 awsemf/application:81 namespace: ECS/AWSOTel/Application82 log_group_name: '/aws/ecs/application/metrics'83 dimension_rollup_option: NoDimensionRollup84 resource_to_telemetry_conversion:85 enabled: true86
87service:88 pipelines:89 traces:90 receivers: [otlp]91 processors: [resourcedetection, batch/traces]92 exporters: [awsxray]93 metrics/application:94 receivers: [otlp]95 processors: [resourcedetection, resource, batch/metrics]96 exporters: [awsemf/application]97
98 extensions: [health_check]
AMP and X-Ray Configuration for Metrics and Traces
By utilizing this configuration you will be able to see datapoints from both metrics and traces in Amazon Managed Services for Prometheus (AMP) and X-Ray.
1extensions:2 health_check:3 sigv4auth:4
5receivers:6 otlp:7 protocols:8 grpc:9 endpoint: 0.0.0.0:431710 http:11 endpoint: 0.0.0.0:431812 awsecscontainermetrics:13
14processors:15 batch/traces:16 timeout: 1s17 send_batch_size: 5018 batch/metrics:19 timeout: 60s20 resourcedetection:21 detectors:22 - env23 - system24 - ecs25 - ec226 filter:27 metrics:28 include:29 match_type: strict30 metric_names:31 - ecs.task.memory.reserved32 - ecs.task.memory.utilized33 - ecs.task.cpu.reserved34 - ecs.task.cpu.utilized35 - ecs.task.network.rate.rx36 - ecs.task.network.rate.tx37 - ecs.task.storage.read_bytes38 - ecs.task.storage.write_bytes39 - container.duration40
41exporters:42 awsxray:43 prometheusremotewrite:44 endpoint: $AWS_PROMETHEUS_ENDPOINT45 auth:46 authenticator: sigv4auth47 resource_to_telemetry_conversion:48 enabled: true49
50service:51 pipelines:52 traces:53 receivers: [otlp]54 processors: [resourcedetection, batch/traces]55 exporters: [awsxray]56 metrics/application:57 receivers: [otlp]58 processors: [resourcedetection, batch/metrics]59 exporters: [prometheusremotewrite]60 metrics:61 receivers: [awsecscontainermetrics]62 processors: [filter]63 exporters: [prometheusremotewrite]64
65 extensions: [health_check, sigv4auth]