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

Version 6 #1125

Open
13 of 24 tasks
willfarrell opened this issue Nov 8, 2023 · 6 comments
Open
13 of 24 tasks

Version 6 #1125

willfarrell opened this issue Nov 8, 2023 · 6 comments

Comments

@willfarrell
Copy link
Member

willfarrell commented Nov 8, 2023

aka The OTel Update (Hopefully)

Release: Nov (after nodejs active LTS starts)

Timeline based on AWS nodejs22.x release cycle

Release Notes: https://github.com/middyjs/middy/blob/release/6.0.0/website/docs/upgrade/5-6.md

Planned

Moved to v17

Maybe

  • improve response streaming support (new middlewares?)
  • plugins as packages?
  • Routers updated to support URLPattern? Still experimental?
  • Move to JSDoc notation? https://www.youtube.com/watch?v=zPOHY-cZ1wE
  • Update abort signals if Lambda adds support
@willfarrell willfarrell pinned this issue Nov 10, 2023
@dreamorosi
Copy link
Contributor

Hi @willfarrell - would like to learn more about the OTel/Powertools points in the list above.

On our side we’ve been looking at OTel closely and for now we have decided to not move forward because the performance impact, especially on cold starts, is still too big.

At least for now, that’s something we won’t be doing at least until 2025, which would be v7 for you.

Curious to hear if you’ve arrived at different conclusions

@willfarrell
Copy link
Member Author

@dreamorosi

On our side we’ve been looking at OTel closely and for now we have decided to not move forward because the performance impact, especially on cold starts, is still too big.

Same, along with OTel Logging not supported for nodejs yet (at least the last time i checked).

OTel was listed for v5, but sounds like it's still not ready for production yet. The idea is to deprecate our logging/cloudwatch middlewares for Powertools using OTel, whenever it's ready. The switch to Otel is the only big change on the horizon for Middy currently.

@jlarmstrongiv
Copy link

Might be worthwhile improving middleware types #1221 (comment)

@dmeehan1968
Copy link

middy currently throws exceptions dependent on whether the event/onError handler returns a response that is 'undefined'. However, void/undefined is a legitimate value for many Lambdas (indeed the default handler definition is for a return value of void | Promise<any>.

Whilst the invocation source of the Lambda should discard any received response the docs currently state 'return request.response will silence the error', but this is only the case if some other middleware had set a response value. At the origin handlers point of failure, response would be undefined.

In my case (EventBridge Rule target), I wanted to send some errors immediately to a DLQ, as Lambda retry wouldn't have been meaningful. I found that return request.response ?? null was what I needed to prevent the error from bubbling up.

@joebowbeer
Copy link

Why wait for OTEL logging? OTEL is not all or nothing; the three parts are separable.

Being able to leverage OTEL metrics and/or traces would be helpful.

For example, prometheus can now receive OTLP metrics directly. See exporter-metrics-otlp-http.

The modular OTEL producer/reader/exporter design is very flexible.

@willfarrell
Copy link
Member Author

6.0.0-alpha.0 is now released. You can preview the release notes at https://github.com/middyjs/middy/blob/release/6.0.0/website/docs/upgrade/5-6.md

@willfarrell willfarrell changed the title Version 6 [Draft] Version 6 Oct 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

5 participants