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 support #1728

Open
sl0thentr0py opened this issue Feb 14, 2022 · 13 comments
Open

AWS lambda support #1728

sl0thentr0py opened this issue Feb 14, 2022 · 13 comments

Comments

@sl0thentr0py
Copy link
Member

For instrumenting AWS Lambda, it seems like it'd be ideal to use Lambda Extensions to deliver error reports. At first glance it looks like the async option would be the way to integrate with Lambda Extensions. Do any of the Sentry libraries for other languages hook into Lambda Extensions? Would there be another way to do that with the Sentry Ruby SDK?

Originally posted by @jordan-brough in #1522 (comment)

@jordan-brough
Copy link

jordan-brough commented Feb 14, 2022

Would you accept a PR adding Lambda support to sentry-ruby?

I have some good experience with Lambda and we're using Sentry+Ruby+Lambda right now.
I just finished adding basic support to our own app, including copying some of Sentry's work on e.g. https://github.com/getsentry/sentry-python/blob/master/sentry_sdk/integrations/aws_lambda.py.

@sl0thentr0py
Copy link
Member Author

@jordan-brough PRs are always welcome!

@st0012
Copy link
Collaborator

st0012 commented Feb 14, 2022

@jordan-brough thanks for the offering. but can we make it under the sentry-lambda folder? I feel that it should be a standalone gem like sentry-rails.
@sl0thentr0py wdyt?

@sl0thentr0py
Copy link
Member Author

yes, thought the same.

@sl0thentr0py
Copy link
Member Author

Also for consistency, please call it sentry-serverless if you do make it.

@jordan-brough
Copy link

👍 Sounds great, I'll do that.

@jordan-brough
Copy link

jordan-brough commented Feb 14, 2022

Also for consistency, please call it sentry-serverless if you do make it.

@sl0thentr0py this is completely up to y'all, but "serverless" is a pretty broad term within AWS, e.g. see everything they list here:
https://aws.amazon.com/serverless/#Serverless_services_on_AWS
and this code will only apply to the Lambda part of serverless.

Also, serverless is used beyond AWS, e.g. Azure: https://azure.microsoft.com/en-us/solutions/serverless/
and this code would be specific to AWS Lambda and not e.g. Azure Functions.

So sentry-lambda might actually be a more specific and durable name for this.

But again I don't have a stake in that so totally up to y'all! Just lmk.

@sl0thentr0py
Copy link
Member Author

@jordan-brough you're not wrong but I was mainly thinking about consistency with our npm package naming. If we do get this ball rolling, we would also look at GCP/azure in the distant future.

@jordan-brough
Copy link

jordan-brough commented Feb 14, 2022

Yah that makes sense. I was wondering if you might want to chat w/ whoever maintains the node/python libraries about considering a rename on their end also. "Lambda" seems like the overall better name to me in this case. But I'll plan on sentry-serverless unless I hear otherwise.

(I'm assuming that a future Azure/GCP addition would probably be in a different gem/package, since I'd wager there are enough differences to merit that)

@sl0thentr0py
Copy link
Member Author

I doubt we'll rename those libs at this point since they've been around for much longer, sry!

@Haumer
Copy link

Haumer commented Apr 4, 2022

Just curious, is there any movement on this 😄 ?

@sl0thentr0py
Copy link
Member Author

@Haumer not specifically, but in the medium long term, we're working on a partially cross-language solution with the AWS Extensions API that we'll release in a couple of months for other languages. Once that is done, we'd still need to add some ruby specific code but eventually we will also use that solution in the ruby SDK.

@kuredev
Copy link

kuredev commented Sep 11, 2023

📝
I recently used the Sentry SDK with AWS Lambda.
With the default settings, due to SDK's asynchronous processing, the Lambda process terminated before sending to Sentry, resulting in failure to send to Sentry.
To avoid this, by setting background_worker_threads to 0, I was able to successfully send to Sentry using Lambda.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: No status
Development

No branches or pull requests

7 participants