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

fix fastify deprecated routerMethod、routerPath #3789

Closed
wants to merge 1 commit into from

Conversation

aimidy
Copy link

@aimidy aimidy commented Dec 15, 2023

FastifyDeprecation: You are accessing the deprecated "request.routerMethod" property. Use "request.routeOptions.method" instead. Property "req.routerMethod" will be removed in fastify@5.
FastifyDeprecation: You are accessing the deprecated "request.routerPath" property. Use "request.routeOptions.url" instead. Property "req.routerPath" will be removed in fastify@5.

Checklist

  • Implement code
  • Add tests
  • Update TypeScript typings
  • Update documentation
  • Add CHANGELOG.asciidoc entry
  • Commit message follows commit guidelines

FastifyDeprecation: You are accessing the deprecated "request.routerMethod" property. Use "request.routeOptions.method" instead. Property "req.routerMethod" will be removed in `fastify@5`.
FastifyDeprecation: You are accessing the deprecated "request.routerPath" property. Use "request.routeOptions.url" instead. Property "req.routerPath" will be removed in `fastify@5`.
Copy link

❌ Author of the following commits did not sign a Contributor Agreement:
ae8437d

Please, read and sign the above mentioned agreement if you want to contribute to this project

@trentm
Copy link
Member

trentm commented Jan 2, 2024

@aimidy Thanks very much for digging into this and opening this PR!

Your patch would, I think, break for fastify 4.x versions before 4.10.0 when req.routeOptions was added. "I think" because I haven't tested that.

I fixed this same issue in the OpenTelemetry repo a few months back open-telemetry/opentelemetry-js-contrib#1763
I've opened #3814 here that should fix the issue.

@trentm trentm self-assigned this Jan 2, 2024
@trentm trentm removed the triage label Jan 2, 2024
@trentm
Copy link
Member

trentm commented Jan 3, 2024

Handled the equivalent via #3814

@trentm trentm closed this Jan 3, 2024
PeterEinberger pushed a commit to fpm-git/apm-agent-nodejs that referenced this pull request Aug 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
agent-nodejs Make available for APM Agents project planning. community
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants