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

AWS Lambda integration fails to detect the aws-lambda-ric 1.0 bootstrap #976

Merged
merged 2 commits into from Jan 18, 2021
Merged

AWS Lambda integration fails to detect the aws-lambda-ric 1.0 bootstrap #976

merged 2 commits into from Jan 18, 2021

Conversation

ghost
Copy link

@ghost ghost commented Jan 14, 2021

Fix for #972

@ghost ghost changed the title fix detection of bootstrap when it lives under __main__ instead of being __main__ AWS Lambda integration fails to detect the aws-lambda-ric 1.0 bootstrap Jan 14, 2021
@ghost
Copy link
Author

ghost commented Jan 14, 2021

Don't know how to get the aws lambda tests to actually run. Until then, the coverage test will not pass.

@ghost ghost marked this pull request as ready for review January 14, 2021 18:40
@ghost ghost closed this Jan 14, 2021
@ghost ghost reopened this Jan 14, 2021
@untitaker
Copy link
Member

@adam-olema the AWS lambda tests run against a real instance and as such require credentials that are not available for PRs of forks.

Can you add a comment indicating why this is necessary? A hint at aws-lambda-ric suffices.

@ghost
Copy link
Author

ghost commented Jan 14, 2021

Under normal documented usage, with the current aws-lambda-ric 1.0, without this change, you only get the following warning, and no errors sent to sentry:

Not running in AWS Lambda environment, AwsLambdaIntegration disabled (could not find handle_event_request)

So, not sure what changed, but in my setup at least, the sentry library does not detect the AWS lambda runtime at all. It may have to do with the structure of my application which places the main handler not at the top level module but in a submodule (ie: not the usual my_app.handler, but instead my_app.sub_module.handler

@untitaker
Copy link
Member

@adam-olema I understand, I am asking that you put this as code comment, to be clear

@ghost
Copy link
Author

ghost commented Jan 14, 2021

@adam-olema I understand, I am asking that you put this as code comment, to be clear

Gotcha. Comment added.

@untitaker untitaker merged commit abf2bc3 into getsentry:master Jan 18, 2021
@untitaker
Copy link
Member

Thanks!

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

Successfully merging this pull request may close these issues.

None yet

1 participant