Skip to content

Conversation

@thefirstspine
Copy link

1/ The clone function is not used anywhere in the dependency - we deleted it

2/ Serialization is throwing a stack overflow exception for recursive objects:

RangeError: Maximum call stack size exceeded
    at Function.valueOf (<anonymous>)
    at Object.common.serialize (/<app>/node_modules/node-loggly-bulk/lib/loggly/common.js:399:28)
    at Object.common.serialize (/<app>/node_modules/node-loggly-bulk/lib/loggly/common.js:420:21)
    at Object.common.serialize (/<app>/node_modules/node-loggly-bulk/lib/loggly/common.js:420:21)
    at Object.common.serialize (/<app>/node_modules/node-loggly-bulk/lib/loggly/common.js:420:21)
    at Object.common.serialize (/<app>/node_modules/node-loggly-bulk/lib/loggly/common.js:420:21)
    at Object.common.serialize (/<app>/node_modules/node-loggly-bulk/lib/loggly/common.js:420:21)
    at Object.common.serialize (/<app>/node_modules/node-loggly-bulk/lib/loggly/common.js:420:21)
    at Object.common.serialize (/<app>/node_modules/node-loggly-bulk/lib/loggly/common.js:420:21)
    at Object.common.serialize (/<app>/node_modules/node-loggly-bulk/lib/loggly/common.js:420:21)

We added a max depth for avoiding it


Tests are passing

 PASS  test/logs.test.js
  when trying to send logs
    ✓ should set correct token, URL, tags, headers and response (4 ms)
    ✓ should work with a non-json message
    ✓ should work with a json message
    ✓ should retry several times when error occurs (11 ms)

Test Suites: 1 passed, 1 total
Tests:       4 passed, 4 total
Snapshots:   0 total
Time:        0.797 s
Ran all test suites.

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.

1 participant