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.

Node.js: Support for breadcrumbs

See original GitHub issue

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.

Issue Analytics

  • State:open
  • Created 3 years ago
  • Comments:7 (3 by maintainers)

github_iconTop GitHub Comments

2reactions
mattdyoungcommented, Jan 6, 2021

👋 @jmshal

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

1reaction
jmshalcommented, Jun 25, 2022

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.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Breadcrumbs for Node.js - Sentry Documentation
Sentry uses breadcrumbs to create a trail of events that happened prior to an issue. These events are very similar to traditional logs,...
Read more >
Express JS - Dynamic Breadcrumbs Creation (Name + URL ...
I would like to create some middleware (Server Side) that will automatically generate breadcrumbs and pass the through to the client.
Read more >
express-url-breadcrumb - npm
Generates an array of breadcrumb items from the current URL and automatically exposes them to views via a variable named breadcrumb.
Read more >
Simple and dynamic breadcrumbs for a NodeJS & Express ...
This code snippet uses the current page URL from 'req' to create breadcrumbs as an array of crumb objects, which I add to...
Read more >
Breadcrumbs for JavaScript - Honeybadger Developer Blog
Breadcrumbs can help you debug client-side JavaScript applications, and are available to all Honeybadger customers as of today.
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