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

feat: Added instrumentation support for Express 5 beta #2476

Merged
merged 1 commit into from
Aug 16, 2024

Conversation

bizob2828
Copy link
Member

Description

This originally started as a research spike to see what broke. It turns out not much so I just PRd support for express 5 beta. We will not officially support it because it hasn't been released as generally available. We will keep tabs on any upcoming beta releases and remove the test stanzas when 5.0.0 is out. I will make sure when this lands to include a secondary changelog item to state this is not officially supported just yet.

Most of the changes are around how child applications are mounted. In v4 they used to be mounted as applications, now they are just mixed in. You can see a difference here:

  • express 4 - it would create a lazyrouter which registered query, and expressInit which would pre-define handlers
  • express 5 - it now doesn't do this and instead just sets on the default app configuration

Also, the routing has changed a little because it migrated to use router@2.0.0-beta. I had to update some definitions and assertions to handle this. Lastly, express 4 used to bind the query and expressInit middleware as part of the mounted application, this is still done but not as first class middleware so I had to loosen some assertions.

Lastly, I added tests for async handlers and how they are handled if they reject.

How to Test

npm run versioned:internal express
npm run versioned:internal express-esm

Related Issues

Closes #2385

"express": "5.0.0-beta.3",
"ejs": "2.5.9"
},
"files": [
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

express-enrouten has been omitted because it doesn't work with express 5. the package hasn't had updates in 7 years and is marked as archived as well

@bizob2828 bizob2828 changed the title feat: Added instrumentation support for Express 5 feat: Added instrumentation support for Express 5 beta Aug 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

express 5 beta instrumentation support
2 participants