question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Consider custom router ?

See original GitHub issue

Is your feature request related to a problem? Please describe.

I’m using egg.js to develop project. In this project, I want to use apm to monitor performance which from fronted to backend service.

In this project apm can not naming transaction with pathname, because of apm use http module, but egg.js use a module forked from koa-router

Describe the solution you’d like

Egg.js fork koa-router and rename egg-router, they add some additional features, but not change the property. So apm can use koa-router module to parse request in egg.js in theory. I notice that, it do judge with package name in Instrumentation. So can add a parameter like customRouterMap, for exmaple:

  customRouterMap: {
    "@eggjs/router": {
        name: "koa-router",
        version: "7.4.0"
    }
  }

put it in start func, then apm can use koa-router module to naming transaction.

There has a simple implementation in my fork.

Please checkout whether it is feasible .

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:11 (7 by maintainers)

github_iconTop GitHub Comments

1reaction
watsoncommented, Mar 27, 2019

The feature was just released in v2.7.0 😊

Check out the new documentation for adding custom patches here: https://www.elastic.co/guide/en/apm/agent/nodejs/current/agent-api.html#apm-add-patch

1reaction
Qardcommented, Mar 26, 2019

The patch registry has landed now and we will be releasing it soon. 😸

Read more comments on GitHub >

github_iconTop Results From Across the Web

I built my own super router out of old PC parts and I've ...
It's easier than you think to build a router that's way better than what you can buy off the shelf.
Read more >
Custom Gateways and Routers: When, Why and How | ...
In this blog post, we'll talk about the considerations for when, why and how you should evaluate a custom gateway or router, including...
Read more >
Numbers don't lie—it's time to build your own router
With more speed available and hardware that can't adapt, DIY builds offer peak performance.
Read more >
Up Your Home Network Performance – Build Your Own Router!
The side benefit of this method is configurability. pfSense has a far more powerful set of options than most common routers. It's config...
Read more >
Shopping for a Router Sucks. Here's What You Need to Know
We're largely looking at using your own router in this guide and using your ISP's ... There's plenty to consider when you're trying...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found