bugsnag-js icon indicating copy to clipboard operation
bugsnag-js copied to clipboard

Node.js: Support for breadcrumbs

Open jmshal opened this issue 4 years ago • 10 comments

Description

It'd be awesome to have official support for Breadcrumbs on Node.js.

Describe the solution you'd like If I'm not mistaken, it should be as simple as removing some lines of code from the @bugsnag/node package.

Describe alternatives you've considered Being sad - but I didn't like that option... so I hope that's not the route you take. 😂

Additional context I wasn't even aware that it was disabled until recently - as I was under the impression that it had been supported for years now. At work we use an in-house framework for our microservices, that has a bundled version of Bugsnag built-in. The way this framework makes use of the @bugsnag/js package meant that we avoided creating a client that had the leaveBreadcrumb method disabled (due to the way the clone client function works). It was a pure coincidence that we avoided this limitation when integrating Bugsnag in our framework.

For the past two years (almost to the date), in production, we've been making use of breadcrumbs on Node.js. To ensure that the breadcrumbs contained useful information, upon each request we enter a Node.js domain, and attach a new Bugsnag client to it. This means that no matter where (within that async call stack) we throw/catch an error, we have the ability to send it off to Bugsnag using the same client that was present at the beginning of the request. We override the console logger to look for this Bugsnag client and automatically leave console-type breadcrumbs. This has given us many many years of happy debugging and has no doubt saved countless hours of engineer's time.

I hope that the fact we've been running this in production for the past 2 years, in 39 services, is reason enough to count breadcrumbs a viable feature to (in my opinion) very easily enable - by removing a few lines of code.

jmshal avatar Jan 06 '21 09:01 jmshal

:wave: @jmshal

Thanks for the additional context. The lack of breadcrumb support for Node.js is something we're hoping to revisit when priorities allow 👍

mattdyoung avatar Jan 06 '21 11:01 mattdyoung

👋 @jmshal

Thanks for the additional context. The lack of breadcrumb support for Node.js is something we're hoping to revisit when priorities allow 👍

Please add it's support in nodejs. It will be very helpfull.

himanshufize avatar Jun 18 '22 15:06 himanshufize

Hi @himanshufize, this is still on our product roadmap but I don't have any further updates at this time. We'll be sure to update this thread when the feature becomes available.

yousif-bugsnag avatar Jun 20 '22 09:06 yousif-bugsnag

I don't really understand why this hasn't been added already, tbh. We've (at my work) been using breadcrumbs with the Node.js client for over 3 years now. Will you accept PRs, @yousif-bugsnag? I wouldn't be able to use the client without breadcrumbs - I am surprised more people aren't voicing their frustration.

jmshal avatar Jun 25 '22 01:06 jmshal

Hi @jmshal - at this stage we don't want to build any additional functionality on top of the deprecated domain API. We do have an item on our roadmap to look at replacing that library in the future, at which point we'll be able to revisit Node.js breadcrumbs when priorities allow.

luke-belton avatar Jun 28 '22 12:06 luke-belton

@luke-belton By just enabling breadcrumbs (which is simply removing an arbitrary restriction) would allow developers to use breadcrumbs in a context/domain agnostic fashion. Do the two need to be conflated?

jmshal avatar Jul 14 '22 09:07 jmshal

Hi @jmshal! This is still on our product roadmap, but I have no updates on it as of now. We will update this thread when we have more news on it.

Cga95 avatar Jul 18 '22 11:07 Cga95

+1 really annoying that we don't have this

chrs-myrs avatar Feb 03 '23 13:02 chrs-myrs

👍 I agree, this would be great.

natemate90 avatar Apr 18 '23 09:04 natemate90

+1

biller-aivy avatar Nov 02 '23 09:11 biller-aivy