question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Chalice integration does not work in local without a timeout config'ed

See original GitHub issue

How 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:closed
  • Created 2 years ago
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
b4stiencommented, Mar 25, 2022

I did submit a PR (https://github.com/aws/chalice/pull/1896) on chalice and it got merged, I think we can close here?

0reactions
github-actions[bot]commented, Apr 16, 2022

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 or Status: In Progress, I will leave it alone … forever!


“A weed is but an unloved flower.” ― Ella Wheeler Wilcox 🥀

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found