Skip to content

bug: OpenAPM not masking the path in some cases #49

Description

@chtushar

Describe the bug

After instrumenting the express app. In some cases OpenAPM is not masking the paths using openapm.instrument('express') signature. The paths in the screenshot should be prefixed with /org/:orgId/

Screenshot 2024-05-13 at 5 58 26 PM

To Reproduce
Steps to reproduce the behavior:

  1. Generate a demo express application using npx express-generator
  2. Use openapm.instrument('express') as per the documentation
  3. Create a router and use a parameter in the base path
  4. Start the application and make calls to the paths initialized in the router.
  5. localhost:9097/metrics won't have a parameterised routes.

Expected behavior
The paths should be parameterized like it is in the screenshot. When the middleware is used directly like this
app.use(openapm.REDMiddleware); the behaviour seems to be as expected.

Screenshot 2024-05-13 at 6 08 35 PM

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions