Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

Identify async_hooks use cases beyond AsyncLocalStorage

Aperta
#437 34 commenti 5 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
5/5
Tempo stimato
Più di una settimana
Idoneità per principianti
25/100
Tipo di issue
Funzionalità
Chiarezza
Da chiarire
Stato di attività
Ferma
Stack tecnologico
nodejs

Direzione di ricerca

Start by reviewing the async_hooks and AsyncLocalStorage use cases listed in the issue, then investigate the Clinic uses mentioned in the discussion. Done means documenting additional use cases and identifying which safer APIs could address them without exposing unsafe resource internals.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

never stale question

It seems to be the general consensus of this working group that async_hooks should not be directly made stable due to it exposing internals. The AsyncLocalStorage API provides a higher-level solution to many of the use cases of async_hooks, however some use cases still remain. I would like to identify what those use cases are so we can introduce safer APIs solving those problems and eventually move toward deprecating direct use of async_hooks or perhaps just the unsafe aspects of it.

Known use cases:

  • long stack traces
    • Shouldn't make any use of the resource objects, so should be reasonably safe.
  • tracking handle lifecycle
    • The subsystem type, id, and event timings can be used to track high-level lifecycle safely
    • Deeper awareness may involve inspecting the resource object, which could be unsafe
  • measure time spent in blocking code
    • Mainly just need timing between before/after and maybe type for extra context, resource not required

What other use cases are there? I know clinic uses it for some things, perhaps @mcollina has some insight on that?

Lingua principale
Nessun dato sulla lingua
Stelle
550
Fork
69
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Guida per i contributori

Apri la guida per i contributori

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di nodejs/diagnostics

Tutte le issue di nodejs/diagnostics

Issue simili

Altre issue su Observability & SRE

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.