Skip to content

Regex matching doesn't account for case insensitivity pattern #3245

@tommyksander

Description

@tommyksander

Note: This issue is related to recent work on:

Expected behaviour

  • dd-trace should handle app.use regex 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.use that 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:

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions