Chalice integration does not work in local without a timeout config'ed
See original GitHub issueHow do you use Sentry?
Sentry Saas (sentry.io)
Version
1.5.6
Steps to Reproduce
The steps lined out in Sentry’s docs for Chalice integration does not work, nothing is pushed on Sentry.
The error is Chalice side and I’ve submitted a PR there but you might want to mitigate on your side.
import sentry_sdk
from boto3.dynamodb.conditions import Key
from chalice import Chalice
from sentry_sdk.integrations.chalice import ChaliceIntegration
sentry_sdk.init(
dsn="A_PROPER_DSN",
integrations=[ChaliceIntegration()],
debug=True,
)
app = Chalice(app_name="the_app")
@app.route("/boom")
def boom():
raise Exception("boom goes the dynamite!")
With debug enabled we get:
Internal error in sentry_sdk
Traceback (most recent call last):
File "/Users/bastien/.pyenv/versions/3.9.7/envs/ouihelp-dsit/lib/python3.9/site-packages/sentry_sdk/integrations/chalice.py", line 67, in wrapped_view_function
configured_time = app.lambda_context.get_remaining_time_in_millis()
File "/Users/bastien/.pyenv/versions/3.9.7/envs/ouihelp-dsit/lib/python3.9/site-packages/chalice/local.py", line 299, in get_remaining_time_in_millis
return self._max_runtime - runtime
TypeError: unsupported operand type(s) for -: 'NoneType' and 'float'
Expected Result
You’d expect an error to pop in Sentry.
Actual Result
Nothing happens.
Issue Analytics
- State:
- Created 2 years ago
- Comments:5 (2 by maintainers)
Top Results From Across the Web
Chalice integration does not report exception in authorizer
I'd expect such an error to be tracked by Sentry. Actual Result. No issue is reported. The text was updated successfully, but these...
Read more >Deploying AWS Chalice application using AWS Cloud ...
In this blog, we will build a simple service based on Amazon API Gateway and AWS Lambda for managing users in Amazon DynamoDB...
Read more >awslabs/chalice - Gitter
Hi, I'm new to chalice and have it all working very well, what i'm trying to do now, is to make chalice work...
Read more >Lambda timeout config get reset to 1 on deploying using chalice
Chalice deploys the settings for the Lambda function, so they must be set in the configuration for Lambda. look in .chalice/config.json
Read more >Configuration File — AWS Chalice
In this directory is a config.json file that you can use to control what ... If not specified chalice will autogenerate this policy...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I did submit a PR (https://github.com/aws/chalice/pull/1896) on chalice and it got merged, I think we can close here?
This issue has gone three weeks without activity. In another week, I will close it.
But! If you comment or otherwise update it, I will reset the clock, and if you label it
Status: Backlog
orStatus: In Progress
, I will leave it alone … forever!“A weed is but an unloved flower.” ― Ella Wheeler Wilcox 🥀