Lightstep Observability’s metrics integration with Amazon uses CloudWatch Metric Streams to send metric data into its system. From the AWS integrations page, you can access AWS CloudFormation and choose the projects that you want to integrate. A built-in template provides most of the needed configuration (you can edit as needed), including any resource enrichments.

Once Lightstep Observability is ingesting metrics from CloudWatch, you can use Terraform to create a number of pre-built dashboards.

In order to take full advantage of Lightstep Observability’s Change Intelligence features, tag your resources with an appropriate service.name tag.

AWS Tag Management

About CloudWatch metric streams

Amazon offers CloudWatch Metric Streams as a way to continually stream metrics to Lightstep Observability and similar services. Metric streams offer near-real-time delivery and an expected latency of as low as 3 minutes. AWS has embraced the OpenTelemetry standard and currently streams metrics in OTLP v0.7. Metric streams are a reliable and cost-effective way to deliver your CloudWatch metrics to Lightstep Observability.

Requirements

You need the following to integrate with AWS metrics:

  • An AWS account.
  • AWS credentials with these permissions:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
"cloudformation:*",
"cloudwatch:DeleteMetricStream",
"cloudwatch:GetMetricStream",
"cloudwatch:PutMetricData",
"cloudwatch:PutMetricStream",
"cloudwatch:StartMetricStreams",
"cloudwatch:StopMetricStreams",
"firehose:CreateDeliveryStream",
"firehose:DeleteDeliveryStream",
"firehose:DescribeDeliveryStream",
"iam:AttachRolePolicy",
"iam:CreateRole",
"iam:DeleteRole",
"iam:DeleteRolePolicy",
"iam:DetachRolePolicy",
"iam:GetRole",
"iam:GetRolePolicy",
"iam:PassRole",
"iam:PutRolePolicy",
"lambda:CreateFunction",
"lambda:DeleteFunction",
"lambda:GetFunction",
"lambda:InvokeFunction",
"s3:AbortMultipartUpload",
"s3:CreateBucket",
"s3:DeleteBucket",
"s3:GetBucketLocation",
"s3:GetObject",
"s3:ListBucket",
"s3:ListBucketMultipartUploads",
"s3:PutBucketPublicAccessBlock",
"s3:PutLifecycleConfiguration",
"s3:PutObject"

Create an AWS integration

Lightstep uses AWS CloudFormation to configure the CloudWatch metric steam and Kinesis Data Firehose to send metrics. It also creates an IAM role for Lightstep in order to enrich the metric data with resource tags.

  1. From the AWS integrations page in Project settings, click Create an integration. AWS integrations page

  2. Click Generate and copy API key. This API key is exclusively for all AWS integrations and is automatically copied to your clipboard. Generate API key

  3. Click Go to AWS CloudFormation.

    Log into your AWS account, if not already logged in. You’re taken to the Quick create stack page in CloudFormation where you can continue the integration. Your AWS resources will be created in whatever region you run the stack from, so ensure that you are in your desired region. CloudFormation console

  4. Enter the copied API key into the Lightstep API Key field.

    Lightstep generates default values for the other fields. You can change most of them as needed, but they must be unique for the project.

    Don’t change the Lightstep Project or Organization fields. These are tied to the API key and will break the integration if changed.

  5. At the bottom of the page, acknowledge the creation of IAM resources, and click Create stack. Create stack

The integration now appears on the AWS Integrations page. AWS integrations page

You can verify that the metrics are reporting by visiting the Metric details page in Project settings.Metric details

Add additional AWS integrations

Your CloudWatch metric stream will only send metrics emitted from the same AWS region and account that the stream exists in. To stream data from other AWS regions and/or accounts, navigate to your desired AWS account and region, and repeat the previous steps to create another integration.

Create dashboards and alerts from AWS integrations

Now that you have AWS metric data reporting to Lightstep, you can use Terraform to create dashboards and alerts from them.

Lightstep offers Terraform modules for a number of pre-built dashboards and alerts. You can access them from the top of the AWS integrations page. Terraform modules in GitHub

Instruction for using the modules can be found here or in the GitHub repo’s README.

Update an integration

You can update or delete any integration in CloudFormation. Click the More ( ⋮ ) icon and choose View in CloudFormation. You can make any changes there, including deleting the integration. Go to CloudFormation

Notes

  • Percentiles are not included in CloudWatch Metric Streams.
  • CloudWatch Metric Streams do not include metrics with timestamps older than two hours - for example, metrics that are aggregated on a daily basis.

If you have previously integrated your CloudWatch metrics with Lightstep Observability prior to the release of our metric streams integration, we strongly recommend transitioning to the streaming integration. It is lower latency, more reliable, and cheaper! Please contact your Technical Account Manager who will be happy to guide you through the upgrade.