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.

Support/make use of Async Hooks

See original GitHub issue

Package + Version

  • @sentry/browser
  • @sentry/node
  • raven-js
  • raven-node (raven for node)
  • other:

Version:

6.5.1

Description

I’ve talked about this extensivly in https://github.com/getsentry/sentry-javascript/issues/2172. But since that issue seems to have stalled and others are also seeming to request this (see https://github.com/getsentry/sentry-javascript/issues/2817#issuecomment-756864140) I thought it would be nicer to open an official dedicated issue.

Why:

Some examples of agents who do use Async Hooks:

Atm I don’t see how one can use Sentry’s performance offering using Node without this being fixed (unless you only serve 1 request at the same time, which isn’t realistic). I hope I’m missing something since we do want to use your offering but don’t see a way of doing that at this time.

Issue Analytics

  • State:open
  • Created 2 years ago
  • Reactions:6
  • Comments:16 (4 by maintainers)

github_iconTop GitHub Comments

7reactions
jasonkcommented, Nov 12, 2021

For anyone else who ends up here hoping to find a way to make Sentry work with async_hooks, I posted a Gist showing how I made this work by using AsyncLocalStorage to create what are effectively thread-local hubs that can make this work better… https://gist.github.com/jasonk/a06153476ae7fad41c527e321e318088

2reactions
frimuchkovcommented, May 7, 2022

Any updates? There are 2022, Node.js 18 and no async_hooks in sentry 😦

Read more comments on GitHub >

github_iconTop Results From Across the Web

Async hooks | Node.js v19.3.0 Documentation
If Worker s are used, each thread has an independent async_hooks interface, and each thread will use a new set of async IDs....
Read more >
Using Async Hooks for Request Context Handling in Node.js
Node.js Async Hooks provide an API to track the lifetime of asynchronous resources in a Node ... Let's use Async Hooks to track...
Read more >
Asynchronous Processes (GNU Emacs Lisp Reference Manual)
Use the string name as the process name; if a process with this name already exists, then name is modified (by appending '...
Read more >
Testing - Spring
The Spring team has found that the correct use of inversion of control (IoC) ... These base test classes provide well-defined hooks into...
Read more >
@ice/store: Documentation | Openbase
Minimal & Familiar API: No additional learning costs, easy to get started with the knowledge of Redux && React Hooks. Built in Async...
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