ceramicnetwork / js-ceramic

Typescript implementation of the Ceramic protocol
http://ceramic.network
Other
414 stars 127 forks source link

feat: add metrics to track queue sizes and add operations - #AES-361 #3282

Closed gvelez17 closed 1 week ago

gvelez17 commented 1 week ago

Description

From the datadog analysis, it looks like the gitcoin out of memory errors are related to queue growth specifically with the p-queue library.

This adds metrics to all instances of PQueue to track the size and add operations.

How Has This Been Tested?

Describe the tests that you ran to verify your changes. Provide instructions for reproduction.

PR checklist

Before submitting this PR, please make sure:

References:

Please list relevant documentation (e.g. tech specs, articles, related work etc.) relevant to this change, and note if the documentation has been updated.

linear[bot] commented 1 week ago

AES-361 investigate why gitcoin's js-ceramic node is crashing so regularly

gvelez17 commented 1 week ago

side node, when i build on my laptop i get a unrelated error

src/ceramic-cli-utils.ts(530,5): error TS2322: Type 'import("/Users/gv/js-ceramic/packages/cli/node_modules/dids/dist/did").DID' is not assignable to type 'import("/Users/gv/js-ceramic/node_modules/dids/dist/did").DID'.
src/ceramic-daemon.ts(333,5): error TS2322: Type 'import("/Users/gv/js-ceramic/packages/cli/node_modules/dids/dist/did").DID' is not assignable to type 'import("/Users/gv/js-ceramic/node_modules/dids/dist/did").DID'.
  Types have separate declarations of a private property '_client'.
lerna ERR! npm run build exited 2 in '@ceramicnetwork/cli'

after running npm install, not sure why this is, should be unrelated.