Skip to content

FastifyDeprecation warning for accessing request.routerPath when accessing a non-existing page #1757

@omBratteng

Description

@omBratteng

Separating the issue reported here #1275 (comment)

What version of OpenTelemetry are you using?

@opentelemetry/[email protected]

What version of Node are you using?

v18

What did you do?

Instrumented node with fastify instrumentation, did a request to a non-existing page.

Can be reproduced by starting the fastify example and doing a request to any non-existent page

curl http://localhost:8080/i_do_not_exist

What did you expect to see?

No deprecation notices

What did you see instead?

(node:9) [FSTDEP017] FastifyDeprecation: You are accessing the deprecated "request.routerPath" property. Use "request.routeOptions.url" instead. Property "req.routerPath" will be removed in `fastify@5`.

Additional context

We are using the latest version of the intrumentation

https://github.com/dailydotdev/daily-api/blob/dc3bbecd7c04984a60a224b19ae9752102caf09e/package.json#L48

and version 4.24.2 of fastify

https://github.com/dailydotdev/daily-api/blob/dc3bbecd7c04984a60a224b19ae9752102caf09e/package.json#L71

So digging a bit further into it, I think it might when the requests are to not found pages. but then both request.routeOptions.url and request.routerPath are undefined.

Metadata

Metadata

Assignees

Labels

bugSomething isn't workingpriority:p4Bugs and spec inconsistencies which do not fall into a higher prioritization

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions