cdklabs / cdk-monitoring-constructs

Easy-to-use CDK constructs for monitoring your AWS infrastructure
https://constructs.dev/packages/cdk-monitoring-constructs
Apache License 2.0
443 stars 56 forks source link

monitorApiGatewayV2HttpApi apiResource docs #440

Closed uttrasey closed 8 months ago

uttrasey commented 8 months ago

Feature scope

apiResource docs

Describe your suggested feature

Hello 👋

When adding monitoring to an api gateway what can we put in apiResource?

      .monitorApiGatewayV2HttpApi({
        api: httpApi,
        apiResource: 'whatgoeshere',
      })

I tried using the path /v1/service/{proxy} but can't get it working. Some docs here would be great. Happy to add a PR once I understand it.

echeung-amzn commented 8 months ago

It should indeed be what can also referred to as a path: https://docs.aws.amazon.com/apigateway/latest/developerguide/api-gateway-method-settings-method-request.html#setup-method-resources

If you're using a proxy resource, it might actually be {proxy+} rather than {proxy}.