Skip to content

async_hooks does not currently provide a way to track causality for a PromiseReactionJob #13437

Closed
@hayes

Description

@hayes
  • Version: v8.0.0
  • Platform: All
  • Subsystem: async_hooks, promises

Currently, there is no way (using async_hooks) to associate a PromiseReactionJob with the async id that fulfilled that promise. There is also no way to get the timing of the kResolved promise life cycle hook. These may be 2 separate issues, but are closely related.

Currently here is what is available for promises:

Ideally there would be a way to access the id of the async context active during kResolved from the before/after hooks. Initially I had expected that during a PromiseReactionJob calling async_hooks.triggeredId() would return the contextId of the context responsible for resolving the promise. I am not sure if this is right approach. but having some way to link these 2 contexts is important for the apm use case.

Metadata

Metadata

Assignees

No one assigned

    Labels

    async_hooksIssues and PRs related to the async hooks subsystem.diag-agendaIssues and PRs to discuss during the meetings of the diagnostics working group.promisesIssues and PRs related to ECMAScript promises.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions