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

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

Open
chtushar opened this issue May 13, 2024 · 1 comment
Open

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

chtushar opened this issue May 13, 2024 · 1 comment

Comments

@chtushar
Copy link
Member

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

@chtushar chtushar added the bug Something isn't working label May 13, 2024
@prathamesh-sonpatki
Copy link
Member

prathamesh-sonpatki commented May 14, 2024

@chtushar, Let's unify the signatures and add test coverage. Also share the example to repro this.

@prathamesh-sonpatki prathamesh-sonpatki added waiting-for-reproduction and removed bug Something isn't working labels May 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants