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

feat(node): add promise count #10149

Open
wants to merge 13 commits into
base: develop
Choose a base branch
from

Conversation

akhil888binoy
Copy link

I tried to solve the issue #9329 . Can you please review this PR and suggest me the changes ?

@AbhiPrasad
Copy link
Member

@akhil888binoy, thank you for the PR! What are the performance implications of this change? Is it possible for you to measure the overhead?

Copy link
Contributor

@anonrig anonrig left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The changes in yarn shouldn't be made I presume.

Comment on lines +69 to +71
/**
*
*/
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
/**
*
*/

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Removing of these lines gives eslint error on line 72 function

Missing JSDoc comment.eslintjsdoc/require-jsdoc

* @param {Object} opts - Options for counting promises.
* @param {boolean} [opts.locations=false] - Whether to count promise locations.
* @param {boolean} [opts.continuation=false] - Whether to consider async continuation chains.
* @returns {function(): number | { [key: string]: number }} - A function to get the count of created and settled promises.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
* @returns {function(): number | { [key: string]: number }} - A function to get the count of created and settled promises.
* @returns {() => number | Record<string, number>} - A function to get the count of created and settled promises.

@@ -1,7 +1,8 @@
/* eslint-disable @typescript-eslint/no-unused-vars */
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we just disable in specific lines, rather than in all file?

@akhil888binoy
Copy link
Author

@akhil888binoy, thank you for the PR! What are the performance implications of this change? Is it possible for you to measure the overhead?

As the unit test fails for the moment I am not able to provide performance implications and overhead

@AbhiPrasad
Copy link
Member

As the unit test fails for the moment I am not able to provide performance implications and overhead

Can you test this outside of the repo? Via a simple Node script?

@lforst
Copy link
Member

lforst commented Mar 8, 2024

Hi @akhil888binoy, thank you so much for the contribution! We had some internal conversations on whether we want to move forward with this. We settled on the fact that this will add complexity to the SDK which we currently do not have the capacity to maintain.

However, the feature is awesome and I would love to see it in the wild! I would like to encourage you to publish this as a standalone package as an integration that anybody could add to their Sentry setup. I hope this isn't too frustrating. We definitely appreciate the effort you have put in.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants