AWS AmazonCloudWatch: Reframe OTLP page as legacy Classic config; add port access warning
Summary
Retitles the page to 'Receive OTLP data with the Classic configuration (legacy)', clarifies that the `otlp` source is legacy versus the new `opentelemetry` section, warns against configuring both on the same endpoints (double billing), removes the EMF-to-CloudWatch-Logs example, and changes the X-Ray trace example ports from 4317/4318 to 4315/4316. Adds a note that the OTLP receiver does not authenticate senders and that access to these ports should be restricted with security groups.
Security assessment
The added sentence explicitly states the OTLP receiver performs no sender authentication and advises restricting the listening ports via security groups, which is security hardening guidance for an unauthenticated network listener. It is not tied to a specific vulnerability, incident, or CVE, so it is documentation of a security best practice rather than a fix.
Evidence
+If you are running the agent in containerized environments and sending telemetry from outside the agent container's network, make sure to specify the endpoint as `0.0.0.0` instead of the default endpoint `127.0.0.1`. The OTLP receiver doesn't authenticate senders, so restrict access to these ports with security groups.
Diff
diff --git a/AmazonCloudWatch/latest/monitoring/CloudWatch-Agent-OpenTelemetry-metrics.md b/AmazonCloudWatch/latest/monitoring/CloudWatch-Agent-OpenTelemetry-metrics.md index d87f75f..dfdec2f 100644 --- a//AmazonCloudWatch/latest/monitoring/CloudWatch-Agent-OpenTelemetry-metrics.md +++ b//AmazonCloudWatch/latest/monitoring/CloudWatch-Agent-OpenTelemetry-metrics.md @@ -7 +7 @@ -# Collect metrics and traces with OpenTelemetry +# Receive OTLP data with the Classic configuration (legacy) @@ -9 +9 @@ -You can collect metrics and traces from your applications or services using the CloudWatch agent with the OpenTelemetry Protocol (OTLP), which is a popular open source solution. You can use any OpenTelemetry SDK to send metrics and traces to the CloudWatch agent. For more information about the available OpenTelemetry SDKs, see [ OpenTelemetry Supported Language APIs & SDKs.](https://opentelemetry.io/docs/languages/). +This is a legacy configuration @@ -11 +11,11 @@ You can collect metrics and traces from your applications or services using the -To collect OpenTelemetry metrics and traces, add an `otlp` section to the CloudWatch agent configuration file. The section has the following fields: +The `otlp` source on this page is a legacy approach retained for existing Classic configurations. For new configurations, use the `opentelemetry` section of the agent configuration. It sends metrics, logs, and traces to the CloudWatch OTLP endpoints as OpenTelemetry data, which you can query with PromQL. For more information, see [Create a CloudWatch agent configuration for OpenTelemetry](./CloudWatch-Agent-OpenTelemetry-config.html). + +Use the `otlp` source on this page only if you already use the Classic configuration and need its destinations. + +The `otlp` source in the Classic `metrics` and `traces` sections opens a local OTLP endpoint on the agent. Your OpenTelemetry SDK sends data to that endpoint, and the agent converts it before sending it to CloudWatch. Metrics are published as CloudWatch metrics in a namespace, and you can't query them with PromQL. + +Don't configure both on the same endpoints + +Don't configure an `otlp` source here and in the `opentelemetry` section on the same endpoints. If you do, the agent sends each data point to both destinations, and you're charged for both. + +To use the source, add an `otlp` section to the Classic `metrics` or `traces` section of the agent configuration file. The `otlp` section has the following fields: @@ -36 +46 @@ Note -If you are running the agent in containerized environments and sending telemetry from outside the agent container's network, make sure to specify the endpoint as `0.0.0.0` instead of the default endpoint `127.0.0.1`. +If you are running the agent in containerized environments and sending telemetry from outside the agent container's network, make sure to specify the endpoint as `0.0.0.0` instead of the default endpoint `127.0.0.1`. The OTLP receiver doesn't authenticate senders, so restrict access to these ports with security groups. @@ -51,16 +61 @@ If you are running the agent in containerized environments and sending telemetry -To send metrics to Amazon CloudWatch Logs using the Embedded metric format (EMF), add the `otlp` section under `metrics_collected` within the `logs` section. This sends the EMF logs by default to the `/aws/cwagent` log group and a generated log stream. The metrics are extracted into the `CWAgent` namespace by default. The following example shows a configuration that sends metrics as EMF logs to CloudWatch Logs: - - - { - "logs": { - "metrics_collected": { - "otlp": { - "grpc_endpoint": "127.0.0.1:4317", - "http_endpoint": "127.0.0.1:4318" - } - } - } - } - - -To send traces to AWS X-Ray, add the `otlp` section under `traces_collected` within the `traces` section. The following example shows a configuration that sends traces to X-Ray: +To send traces to AWS X-Ray, add the `otlp` section under `traces_collected` within the `traces` section. The following example shows a configuration that sends traces to X-Ray. Because each `otlp` section needs its own endpoint, this example uses different ports from the metrics example so that you can use both: @@ -73,2 +68,2 @@ To send traces to AWS X-Ray, add the `otlp` section under `traces_collected` wit - "grpc_endpoint": "127.0.0.1:4317", - "http_endpoint": "127.0.0.1:4318" + "grpc_endpoint": "127.0.0.1:4315", + "http_endpoint": "127.0.0.1:4316"