amazon-api-gateway-developer-guide icon indicating copy to clipboard operation
amazon-api-gateway-developer-guide copied to clipboard

Correct descriptions of WebSocket API CloudWatch metrics

Open rwalle61 opened this issue 4 years ago • 0 comments

Hi, thanks for the developer guide, it's helped me out a lot! 😄

The metric descriptions on the Monitoring WebSocket API execution with CloudWatch metrics page seem a bit inaccurate or insufficient. It'd be great to clarify the ClientError, IntegrationError and ExecutionError metric descriptions.

ClientError is supposedly triggered before the integration is invoked: image

But I can trigger it after the integration is invoked. For example, if I connect my WebSocket API to a lambda proxy integration, and make that handler return { statusCode: 400 }, then the ClientError metric increases: image

The current description seems misleading, suggesting that ClientError only happens before the integration is invoked - i.e. due to authoriser errors or request validation.

Also, it'd be great if a doc explained how the WebSocket API, API Gateway service, stage, integration, and lambda actually interact. For example, it's not clear why:

  • the lambda integration always return 200, even if my lambda handler returns other statusCode
  • if I misconfigure the integration's permissions, the integration request fails, and ExecutionError metric increases but not IntegrationError: image

In summary, I'd really appreciate your clarification on what the ClientError, IntegrationError and ExecutionError metrics really represent for WebSocket and REST APIs. Thanks 🙂

rwalle61 avatar Oct 14 '21 10:10 rwalle61