Skip to content

Design doc for supporting async code in groups #5435

Description

@ankur22

What

group() has two things it does:

  1. it measures how long the provided callback takes to execute and amits as group_duration with a group tag with the same name as the first argument.
  2. it sets the group tag so all things metrics emitted within the callback are tagged with it.

Neither of these currently work with async code due to its implementation. Both are important for users.

The first point is a lot easier to implement as in this gist
The second point is blocked on https://github.com/tc39/proposal-async-context or similar functionality - potentially
#3392 as implementation.

Reading list

Next steps

Summarise the proposals in a design doc so that we can align on a single proposal to overcome these two limitations.

Activity

  1. ankur22 commented on Feb 16, 2026

    @ankur22
    ContributorAuthor

    Please take a look at the issue for the planning stage for this feature: #5673

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

No labels
No labels

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions