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

Support Browser usage #43

Open
rue-bwebb opened this issue Nov 7, 2018 · 1 comment
Open

Support Browser usage #43

rue-bwebb opened this issue Nov 7, 2018 · 1 comment

Comments

@rue-bwebb
Copy link

Right now the only thing preventing this library from being usable in modern browsers natively is the call to tid.unref in the logger. Could we get this line changed to something like tid.unref && tid.unref()?

Mr0grog added a commit to Mr0grog/node-datadog-metrics that referenced this issue Sep 15, 2022
Not all JavaScript environments have a `.unref()` function on timers. This guards the one usage of `.unref()` so as not to cause exceptions in environments that do not have it. It solves the main issue called out in dbader#43, although there could be other barriers to browser-based usage.
ErikBoesen pushed a commit that referenced this issue Sep 19, 2022
Not all JavaScript environments have a `.unref()` function on timers. This guards the one usage of `.unref()` so as not to cause exceptions in environments that do not have it. It solves the main issue called out in #43, although there could be other barriers to browser-based usage.
@Mr0grog
Copy link
Collaborator

Mr0grog commented Sep 21, 2022

@rue-bwebb The specific issue you noted (timer.unref()) will be fixed as soon as the next release is published, although we aren’t actively testing or maintaining for browser-based usage. If you’re still trying to use (or using) this in a browser, please give the code on the main branch a try and post back here if you hit other problems.

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

No branches or pull requests

2 participants