Ingesting AWS CloudWatch metrics and logs

Ingest CloudWatch

AWS CloudWatch allows to forward metrics and logs to third-party destinations using AWS Kinesis Data Firehose. Uptrace provides compatible HTTP endpoints for AWS Kinesis so you can monitor your AWS infrastructure with Uptrace.

Metrics

CloudWatch Metrics is a monitoring service provided by Amazon Web Services (AWS) that allows you to collect and track metrics from your applications and infrastructure resources in real-time.

You can configure AWS CloudWatch to send metrics to Uptrace using AWS Kinesis Data Firehose.

Terraform module

Uptrace provides a Terraform moduleopen in new window that configures AWS CloudWatch to send metrics to Uptrace. Refer to the module's readme for details.

AWS Console

You can also configure CloudWatch manually using the AWS Console.

  1. Create a new Kinesis Data Firehose Delivery Streamopen in new window with the following details:

    • Stream source: Direct PUT
    • Kinesis endpoint: https://api.uptrace.dev/api/v1/cloudwatch/metrics
    • API Key: Enter the Uptrace DSN for your project.
    • Content Encoding: GZIP.
  2. Create a new CloudWatch Metric Streamopen in new window.

    1. Open the CloudWatch AWS consoleopen in new window.
    2. Choose Metrics → Streams.
    3. Click the Create metric stream button.
    4. Choose CloudWatch metric namespaces to include in the metric stream.
    5. Choose Select an existing Firehose owned by your account, and select the Firehose Delivery Stream you created earlier.
    6. Specify an Output Format of json.
    7. Optionally, specify a name for this metric stream under Metric Stream Name.
    8. Click on the Create metric stream button.

Logs

CloudWatch Logsopen in new window is a log management service provided by Amazon Web Services (AWS) that allows you to collect, monitor, and analyze log files from your applications and infrastructure.

You can configure AWS CloudWatch to send logs to Uptrace using AWS Kinesis Data Firehose.

Terraform module

Uptrace provides a Terraform moduleopen in new window that configures AWS CloudWatch to send logs to Uptrace. Refer to the module's readme for details.

AWS Console

You can also configure CloudWatch manually using the AWS Console.

  1. Create a new Kinesis Data Firehose Delivery Streamopen in new window with the following details:

    • Stream source: Direct PUT
    • Kinesis endpoint: https://api.uptrace.dev/api/v1/cloudwatch/logs
    • API Key: Enter the Uptrace DSN for your project.
    • Content Encoding: GZIP.
  2. Create a new CloudWatch log groupopen in new window using the Firehose Delivery Stream you created earlier.

Conclusion

AWS CloudWatch is a powerful tool for monitoring, collecting, and analyzing data from your AWS resources and applications. It helps you identify and resolve issues, optimize resource utilization, and ensure the overall performance and availability of your AWS infrastructure.

Using AWS Kinesis Data Firehose, you can forward metrics and logs to Uptrace, open source APM tool that supports distributed tracing, metrics, and logs.

Last Updated: