bug: OpenAPM not masking the path in some cases

Aperta
#49 1 commento 0 reazioni 1 assegnatario Vedi su GitHub

@chtushar ci sta già lavorando.

Dal 14/5/2024.

Valutazione

Questa issue non è ancora stata valutata.

Descrizione

waiting-for-reproduction

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

Lingua principale
TypeScript
Stelle
67
Fork
5
Merge medio
23h 14m
PR unite (30g)
2

Preparare l'ambiente

Questo progetto non fornisce container di sviluppo, Dockerfile né guida per i contributori, quindi l'ambiente è a tuo carico: parti dal suo README e consulta la nostra guida al primo contributo per i passaggi generali.

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di last9/openapm-nodejs

Tutte le issue di last9/openapm-nodejs

Issue simili

Altre issue su TypeScript

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.