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

Support for AccessLogSetting and TracingEnabled from AWS::Serverless::Api #1753

Open
dreamorosi opened this issue Jun 10, 2021 · 3 comments
Open
Labels

Comments

@dreamorosi
Copy link

Currently Chalice allows for an xray key that according to the documentation is:

A boolean that turns on AWS XRay’s Active tracing configuration. This will turn on XRay for both Lambda functions and API Gateway stages.

What it actually does is to enable tracing only for the functions but not the API Gateway. The generated CloudFormation template has a "Tracing": "Active" property in the AWS::Serverless::Function resource but doesn't have the TracingEnabled needed in the AWS::Serverless::Api resources to enable tracing.

Also the access logs are not implemented at all and would be great to have them to implement best observability practices. AWS::Serverless::Api exposes a AccessLogSetting property that would allow to set CloudWatch access logging on the stage.

@jamesls
Copy link
Member

jamesls commented Jun 14, 2021

Looks like this is a bug with the cloudformation/terraform packaging. The chalice deploy backend does create an API Gateway with tracing enabled (source), so I think this was just a miss on our end.

The AccessLogSetting would likely be a separate config option.

@dreamorosi
Copy link
Author

Just for the sake of those who stumble upon this issue, in the meantime that the feature/bug is implemented you can enable both settings via CloudFormation template merge; at the time of opening this issue I wasn't aware of it yet but it worked.

@Matvii-Boichenko
Copy link

Matvii-Boichenko commented Mar 24, 2023

I use chalice with cdk and i use cdk deploy without chalice package, so this issue is super important for me as i need manually go and update each apigateway to use xray or write a script for this. Any updates?

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

No branches or pull requests

3 participants