Skip to content

Design doc for supporting async code in groups #5435

@ankur22

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.

Metadata

Metadata

Labels

No labels
No labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions