是的,API Gateway中的模拟集成端点也支持IntegrationLatency指标。为了获取此指标,您可以使用AWS CLI或SDK,在API Gateway中启用访问日志记录,并添加相应的监控。以下是AWS CLI的示例代码片段:
aws apigateway update-account --patch-operations op=replace,path=/apiLogging/dataTraceEnabled,value=true
aws apigateway update-stage --rest-api-id {rest-api-id} --stage-name {stage-name} --patch-operations op=replace,path=/logging/dataTraceEnabled,value=true
aws apigateway update-stage --rest-api-id {rest-api-id} --stage-name {stage-name} --patch-operations op=replace,path=/logging/loglevel,value=INFO
aws apigateway create-deployment --rest-api-id {rest-api-id} --stage-name {stage-name}
在这里,您需要将{rest-api-id}替换为API Gateway的唯一标识符,将{stage-name}替换为API的阶段名称。然后,您可以使用CloudWatch指标对日志进行分析,获取IntegrationLatency指标。