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

Debugging with request is frustrating #6

Open
benjamingr opened this issue Aug 16, 2019 · 3 comments
Open

Debugging with request is frustrating #6

benjamingr opened this issue Aug 16, 2019 · 3 comments

Comments

@benjamingr
Copy link
Contributor

Coralogix logger uses request internally - and .json, this tries to JSON.parse inside a try/catch internally which triggers "pause on all exceptions" a ton of times:

Screen Shot 2019-08-16 at 16 18 54

This can be fixed in several ways:

  • returning valid JSON from /api/v1/logs (for example by returning "OK" and not OK).
  • Calling .text() and not .json.
  • Not using request for this and using http internally.
@EldarAliiev
Copy link
Contributor

We are in the transition phase to move out from request library.

@omril1
Copy link

omril1 commented Aug 18, 2022

We are in the transition phase to move out from request library.

Hi, any progress on that?

@benjamingr
Copy link
Contributor Author

@yaircohendev this SDK in general is pretty neglected, uses loggers one shouldn't (bunyan/winston) instead of the modern ones (like pino), uses RxJS needlessly, doesn't clean up properly and a bunch of other things that modern JS code bases have generally stopped doing.

It might be a good idea to either deprecate this SDK (and direct people towards something like pino-elasticsearch and the ES API and provide a proxy/security for browser usage or alternatively fix it to be at a more industry-standard place.

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

3 participants