-
Notifications
You must be signed in to change notification settings - Fork 351
Closed
Labels
Description
Note: This issue is related to recent work on:
- fix(express): dont lose route if preceded by middleware with longer path #2065
- improve express regex middleware path parsing #3203
Expected behaviour
- dd-trace should handle
app.useregex strings that include case insensitivity. E.g.,(/^\/(?!sample\/route).*/i)
Actual behaviour
- dd-trace doesn't identify this regex pattern, so the bug fixed in <> still exists for patterns that include case insensitivity. (code)
Steps to reproduce
- Add
app.usethat includes a regex with case insensitivity E.g.,(/^\/(?!sample\/route).*/i) - Run dd-trace to see routes are lost.
- Probably easiest to add this case in the unit tests and run it there: packages/datadog-plugin-express/test/index.spec.js
Environment
- Operation system:
- Node.js version:
- Tracer version:
- Agent version:
- Relevant library versions: