Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to enable full requests/responses data and detailed CloudWatch Metrics? #1488

Closed
mohamedelephant opened this issue Mar 4, 2020 · 1 comment

Comments

@mohamedelephant
Copy link

mohamedelephant commented Mar 4, 2020

Description:

I'm having an issue with enabling Log full requests/responses data in my API GW that I create from a Swagger file.

I managed to get the configs for enabling CloudWatch Logs in INFO level.
I tried to understand the process in this case, but no luck to understand what and why should I this snippet.

Steps to reproduce the issue:
1.This is the code that I have for now:

ApiGatewayApi:
  Type: AWS::Serverless::Api
  Properties:
    MethodSettings:
      - LoggingLevel: INFO
        ResourcePath: '/*'
        HttpMethod: '*'
    DefinitionUri: ../Swagger.yaml
    StageName: Prod
  1. I can see that Enable CloudWatch Logs is enabled in the console.

Observed result:
This will enable Enable CloudWatch Logs at INFO level.

The question here is how to enable Enable Full requests/responses data option?
Also, same to Enable Detailed CloudWatch Metrics, how to enable this option?

@cb-hariharasudan
Copy link

cb-hariharasudan commented Jul 15, 2020

Can u try adding the DataTraceEnabled param under the MethodSettings .. please mind the indentations as well

ApiGatewayApi:
  Type: AWS::Serverless::Api
  Properties:
    MethodSettings:
      - LoggingLevel: INFO
        ResourcePath: '/*'
        HttpMethod: '*'
        DataTraceEnabled: 'true'
    DefinitionUri: ../Swagger.yaml
    StageName: Prod

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants