Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add async event loop lag metric #3033

Closed
dapplion opened this issue Aug 28, 2021 · 1 comment
Closed

Add async event loop lag metric #3033

dapplion opened this issue Aug 28, 2021 · 1 comment
Labels
prio-high Resolve issues as soon as possible. scope-metrics All issues with regards to the exposed metrics.

Comments

@dapplion
Copy link
Contributor

We need a metric to track how "busy" our node is.

A potential approach would be to track async event loop lag:

setInterval(async () => {
  const startTime = Date.now();
  await sleep(0);
  const asyncEventLoopLag = Date.now() - startTime;
}, 1000)

Originally posted by @dapplion in #2952 (comment)

@dapplion dapplion added scope-metrics All issues with regards to the exposed metrics. prio-high Resolve issues as soon as possible. labels Aug 28, 2021
@dapplion
Copy link
Contributor Author

prom-client should already have a similar metric. Check with libuv internals for more detailed metrics

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
prio-high Resolve issues as soon as possible. scope-metrics All issues with regards to the exposed metrics.
Projects
None yet
Development

No branches or pull requests

1 participant