Amazon API Gateway is a fully managed service that makes it easy for developers to create, publish, maintain, monitor, and secure APIs at any scale.
Enable this integration to see in Datadog all your API Gateway metrics.
If you haven’t already, set up the Amazon Web Services integration first.
In the AWS integration tile, ensure that API Gateway
is checked under metric collection.
Add the following permissions to your Datadog IAM policy in order to get custom tags applied to API Gateway Stages
apigateway:GET
tag:GetResources
Install the Datadog - AWS API Gateway integration.
Enable API Gateway logging:
Go to API gateway in your AWS console.
Select the wanted API and go to the Stages section.
In the Logs tab, enable Enable CloudWatch Logs and Enable Access Logging.
Select the INFO
level to make sure you have all the requests.
Make sure your Cloudwatch Group name starts with api-gateway
.
Select the JSON format (CLF and CSV are also supported) and add the following in the Log format box:
{
"requestId":"$context.requestId",
"ip":"$context.identity.sourceIp",
"caller":"$context.identity.caller",
"user":"$context.identity.user",
"requestTime":$context.requestTimeEpoch,
"httpMethod":"$context.httpMethod",
"resourcePath":"$context.resourcePath",
"status":$context.status,
"protocol":"$context.protocol",
"responseLength":$context.responseLength
}
Once done, go in your Datadog Log section to start exploring your logs!
aws.apigateway.4xxerror (count) | The number of client-side errors Shown as operation |
aws.apigateway.5xxerror (count) | The number of server-side errors Shown as operation |
aws.apigateway.count (count) | The number call to API methods Shown as operation |
aws.apigateway.cache_hit_count (count) | The number of requests served from the API cache Shown as operation |
aws.apigateway.cache_miss_count (count) | The number of requests served from the back end when API caching is enabled Shown as operation |
aws.apigateway.latency (gauge) | The time between when API Gateway receives a request from a client and when it returns a response to the client. The latency includes the integration_latency and other API Gateway overhead. Shown as millisecond |
aws.apigateway.latency.maximum (gauge) | The maximum time between when requests are received and when responses returned Shown as millisecond |
aws.apigateway.latency.minimum (gauge) | The minimum time between when requests are received and when responses returned Shown as millisecond |
aws.apigateway.latency.p90 (gauge) | The 90th percentile time between when requests are received and when responses returned Shown as millisecond |
aws.apigateway.latency.p95 (gauge) | The 95th percentile time between when requests are received and when responses returned Shown as millisecond |
aws.apigateway.latency.p99 (gauge) | The 99th percentile time between when requests are received and when responses returned Shown as millisecond |
aws.apigateway.integration_latency (gauge) | The time between when API Gateway relays a request to the back end and when it receives a response from the back end. Shown as millisecond |
aws.apigateway.integration_latency.maximum (gauge) | The maximum time between when API Gateway relays a request to the back end and when it receives a response from the back end. Shown as millisecond |
aws.apigateway.integration_latency.minimum (gauge) | The minimum time between when API Gateway relays a request to the back end and when it receives a response from the back end. Shown as millisecond |
aws.apigateway.integration_latency.p90 (gauge) | The 90th percentile time between when API Gateway relays a request to the back end and when it receives a response from the back end. Shown as millisecond |
aws.apigateway.integration_latency.p95 (gauge) | The 95th percentile time between when API Gateway relays a request to the back end and when it receives a response from the back end. Shown as millisecond |
aws.apigateway.integration_latency.p99 (gauge) | The 99th percentile time between when API Gateway relays a request to the back end and when it receives a response from the back end. Shown as millisecond |
Each of the metrics retrieved from AWS will be assigned the same tags that appear in the AWS console, including but not limited to host name, security-groups, and more.
The AWS API Gateway integration does not include any events.
The AWS API Gateway integration does not include any service checks.
Need help? Contact Datadog support.
On this Page