Viewing Metrics
Seed pulls together CloudWatch Metrics to give you an overview of your Lambda and API metrics. This includes the number of requests, and latency of your Lambda function or API endpoint over time. Viewing these metrics gives you a view of how your Serverless app is performing and you can use it to debug specific issues.
A couple of quick notes about the metrics viewer in Seed:
- Seed internally uses CloudWatch Metrics for this.
- This means that you get unlimited data retention!
- However, AWS will charge you small amount based on your region. It’s roughly $0.01 per 1,000 metrics queried. Make sure to check the CloudWatch Metrics pricing for your region.
- We also need a couple of additional permissions to connect to CloudWatch in your account. More on this below.
Lambda Metrics
To view the Lambda metrics for a stage, simply select the stage.
Click View Resources for the service you are looking for and navigate to the Metrics for the Lambda function.
This gives you a live look at the last 1 hour of metrics.
You can easily view the metrics for a different period of time. The time field can take a specific time, range, timestamp, or even a different timezone.
For Lambda, Seed shows you the following metrics:
-
Invocation Count
This is the number of times the Lambda has been invoked.
-
Duration
This is the average, P90, P95, and P99 time (in ms) it took to execute the Lambda.
API Gateway Metrics
To view the API Gateway metrics for a stage, click on Metrics for the API endpoint. Or you can use the search field just as above.
Similar to the Lambda metrics, you get a live view of the last hour of metrics.
You can view the following API metrics here:
-
Request Count
This is the number of requests made to API Gateway.
-
Latency
This is the average, P90, P95, and P99 time (in ms) it took to respond to a request.
Additional IAM Permissions
To connect to CloudWatch in your AWS account, Seed needs the following set of additional permissions.
{
"PolicyName": "MonitorMetrics",
"PolicyDocument": {
"Version": "2012-10-17",
"Statement": [
{
"Effect": "Allow",
"Action": [
"apigateway:GET",
"cloudwatch:GetMetricData"
],
"Resource": "*"
}
]
}
}
The metrics viewer in Seed is designed to work with your development workflow by helping you quickly debug any issues with your deployed apps.
Help improve this page. Edit it with GitHub
Was this page helpful? Let us know via Twitter
Do your Serverless deployments take too long? Incremental deploys in Seed can speed it up 100x!
Learn More