-
Notifications
You must be signed in to change notification settings - Fork 62
This issue was moved to a discussion.
You can continue the conversation there. Go to discussion →
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
Revisit AWS Lambda integration #668
Comments
@subzero10 any thoughts on this one? |
Yeah, we could improve the type definition, it is quite basic at the moment.
Indeed, the callback vs promise adds additional complexities to the code. It’s harder to read and maintain. We even had to come up with some hacks to support this. I would say the evolution of this code would be to either deprecate the callback version entirely or split in two
Domains have been deprecated for a long time and personally I have never used them in my projects. +1 to go for an alternative solution.
Yes, that would be nice! Going forward, I suggest we create a few tickets out of this, since they can be tackled in parallel (or independently).
What do you think? |
I'm forgetting exactly why we used domains before, but there was a really good reason (and I believe even though they're deprecated, they're still used by some similar packages). I'd want to research to make sure we're not losing anything/adding regressions by removing/replacing them. I'm good with the other items. Regarding promises vs. callbacks, I'm fine with promises internally. For end users, I just want to make sure that we support whatever it is they're doing with minimal hassle (two functions would be OK). Does @subzero10's suggestions cover your initial thoughts, @shalvah? Feel free to create some additional issues so that we can continue these discussions separately (if it makes sense). We could also try using GitHub Discussions to further discuss these items before creating discrete issues. I think I'd like to try adding GitHub Discussions to our workflow in the future, to cut down on issues. |
Yeah, I'm on board. Re the typedef, maybe we can add this lambda types package, (example post for reference) although that means every user of HB JS will have that included.
I'd prefer this, but it seems the callback version is still supported, though I rarely see it in newer code. Still, our current implementation does two things we need to fix:
Re domains, we could look around, but I believe their main use case was to track context in concurrent async code executed in the same process, but Lambda functions are one process per request, and I think @joshuap I can convert this to a discussion if you think it's a better fit. |
@shalvah thanks, yeah let's try converting to a discussion! |
This issue was moved to a discussion.
You can continue the conversation there. Go to discussion →
I'm using honeybadger-js on an AWS Lambda function. It works (wrapping my handler in
Honeybadger.lambdaHandler()
catches errors), but I'm noticing a few things:callback
parameter, when you can just return aPromise
these days.async_hooks
, but I think we may not even need any of those—unhandledRejection
anduncaughtException
, or even a try/catch should be enough. (Also, Node.js 10 is no longer supported, so no need to worry about that.)I'm willing to explore/implement these myself, just documenting them here for any thoughts.
The text was updated successfully, but these errors were encountered: