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

fix wrong rpcMetadata.route value when route.use(<middleware>) handle nested router #1613

Open
biuboombiuboom opened this issue Jul 26, 2023 · 2 comments
Labels
bug Something isn't working priority:p2 Bugs and spec inconsistencies which cause telemetry to be incomplete or incorrect stale

Comments

@biuboombiuboom
Copy link

What version of OpenTelemetry are you using?

opentelemetry: 1.4.0
node: 16.14.2

What version of Node are you using?

What did you do?

    const app = express();
    const router = express.Router();
    app.use('/users', router);
    router.get('/:userId', (req, res) => {
      res.status(200).end('user-'+req.params.userId);
    });
    router.use(customMiddleware);
    const bookRouter = express.Router({ mergeParams: true });
    router.use('/:userId/books', bookRouter);
    bookRouter.get('/:bookId', (req, res) => {
      setImmediate(() => {
        res.status(200).end('book-' + req.params.bookId);
      });
    });       

request http://localhost:8080/proxy/v1/bar/1

What did you expect to see?

rpcMetadata.route='/users/:userId/books/:bookId'

What did you see instead?

rpcMetadata.route='/:userId/books/:bookId'
@biuboombiuboom biuboombiuboom added the bug Something isn't working label Jul 26, 2023
@dyladan dyladan added the priority:p2 Bugs and spec inconsistencies which cause telemetry to be incomplete or incorrect label Jul 26, 2023
@github-actions
Copy link
Contributor

This issue is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 14 days.

@github-actions github-actions bot added the stale label Sep 25, 2023
@mikesimons
Copy link

Looks like OP decided to drop the PR but this is definitely still an issue.

@blumamir @chigia001 Is the approach taken in #1615 the right direction?
Would consider picking this up with some direction on how you think it could be solved.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working priority:p2 Bugs and spec inconsistencies which cause telemetry to be incomplete or incorrect stale
Projects
None yet
3 participants