AWS API Gateway monitoring

Amazon API Gateway is an AWS service for creating, publishing, maintaining, monitoring, and securing REST, HTTP, and WebSocket APIs. SkyWalking leverages AWS Kinesis Data Firehose receiver to transfer the CloudWatch metrics of API Gateway(HTTP and REST APIs) to OpenTelemetry receiver and into the Meter System.

Data flow

  1. AWS CloudWatch collect metrics for API Gateway(REST and HTTP APIs), refer to API Gateway HTTP APIs monitoring with CloudWatch and API Gateway REST APIs monitoring with CloudWatch
  2. CloudWatch metric streams stream CloudWatch metrics of API Gateway to AWS Kinesis Data Firehose
  3. AWS Kinesis Data Firehose delivery metrics to AWS Kinesis Data Firehose receiver through the HTTP endpoint

Set up

  1. Enable CloudWatch metrics for API Gateway
  2. Create an Amazon Kinesis Data Firehose Delivery Stream, and set AWS Kinesis Data Firehose receiver's address as HTTP(s) Destination, refer to Create Delivery Stream
  3. Create CloudWatch metric stream, and select the Firehose Delivery Stream which has been created above, set Select namespaces to AWS/ApiGateway, Select output format to OpenTelemetry 0.7. refer to CloudWatch Metric Streams

Gateway Monitoring

SkyWalking observes CloudWatch metrics of the AWS API Gateway, which is cataloged as a LAYER: AWS_GATEWAY Service in the OAP. Meanwhile, the routes would be recognized as LAYER: AWS_GATEWAY endpoints

Supported Metrics

Monitoring PanelUnitMetric NameCatalogDescriptionData Source
Request Countcountaws_gateway_service_countServiceThe total number API requests in a given period.API Gateway HTTP APIs monitoring with CloudWatch and API Gateway REST APIs monitoring with CloudWatch
4xx Countcountaws_gateway_service_4xxServiceThe number of client-side errors captured in a given period.API Gateway HTTP APIs monitoring with CloudWatch and API Gateway REST APIs monitoring with CloudWatch
5xx Countcountaws_gateway_service_5xxServiceThe number of server-side errors captured in a given period.API Gateway HTTP APIs monitoring with CloudWatch and API Gateway REST APIs monitoring with CloudWatch
Request Average Latencymsaws_gateway_service_latencyServiceThe time between when API Gateway receives a request from a client and when it returns a response to the client.API Gateway HTTP APIs monitoring with CloudWatch and API Gateway REST APIs monitoring with CloudWatch
Request Average Integration Latencymsaws_gateway_service_integration_latencyServiceThe time between when API Gateway relays a request to the backend and when it receives a response from the backend.API Gateway HTTP APIs monitoring with CloudWatch and API Gateway REST APIs monitoring with CloudWatch
Data ProcessedKBaws_gateway_service_data_processedServiceThe amount of data processedAPI Gateway HTTP APIs monitoring with CloudWatch
Cache Hit Count Rate%aws_gateway_service_cache_hit_rateServiceThe number of requests served from the API cacheAPI Gateway REST APIs monitoring with CloudWatch
Cache Miss Count Rate%aws_gateway_service_cache_miss_rateServiceThe number of requests served from the backendAPI Gateway REST APIs monitoring with CloudWatch
Request Countcountaws_gateway_endpoint_countEndpointThe total number API requests in a given period.API Gateway HTTP APIs monitoring with CloudWatch and API Gateway REST APIs monitoring with CloudWatch
4xx Countcountaws_gateway_endpoint_4xxEndpointThe number of client-side errors captured in a given period.API Gateway HTTP APIs monitoring with CloudWatch and API Gateway REST APIs monitoring with CloudWatch
5xx Countcountaws_gateway_endpoint_5xxEndpointThe number of server-side errors captured in a given period.API Gateway HTTP APIs monitoring with CloudWatch and API Gateway REST APIs monitoring with CloudWatch
Request Average Latencymsaws_gateway_endpoint_latencyEndpointThe time between when API Gateway receives a request from a client and when it returns a response to the client.API Gateway HTTP APIs monitoring with CloudWatch and API Gateway REST APIs monitoring with CloudWatch
Request Average Integration Latencymsaws_gateway_endpoint_integration_latencyEndpointThe time between when API Gateway relays a request to the backend and when it receives a response from the backend.API Gateway HTTP APIs monitoring with CloudWatch and API Gateway REST APIs monitoring with CloudWatch
Data ProcessedKBaws_gateway_endpoint_data_processedEndpointThe amount of data processedAPI Gateway HTTP APIs monitoring with CloudWatch
Cache Hit Count Rate%aws_gateway_endpoint_cache_hit_rateEndpointThe number of requests served from the API cacheAPI Gateway REST APIs monitoring with CloudWatch
Cache Miss Count Rate%aws_gateway_endpoint_cache_miss_rateEndpointThe number of requests served from the backendAPI Gateway REST APIs monitoring with CloudWatch

Customizations

You can customize your own metrics/expression/dashboard panel. The metrics definition and expression rules are found in /config/otel-rules/aws-gateway/. The AWS Cloud EKS dashboard panel configurations are found in /config/ui-initialized-templates/aws_gateway.