wu-sheng commented on PR #130:
URL: 
https://github.com/apache/skywalking-nodejs/pull/130#issuecomment-4656381882

   Thanks @maxming2333 — excellent write-up. Your root-cause analysis is 
exactly right: gating `reportFunction` on `isConnected` so no `collect()` call 
is created while the channel isn't `READY`, with `getConnectivityState(true)` 
driving automatic reconnect.
   
   We've merged the fix in #132, which takes the same core approach. In 
addition to the connectivity gate it also throttles/slims the failure logging — 
the repeated winston error records (the `"14 UNAVAILABLE …"` strings you 
spotted) were the dominant retainer in the reporter's heap dump — and fixes the 
dead `SW_AGENT_MAX_BUFFER_SIZE` / `SW_AGENT_TRACE_TIMEOUT` env parsing.
   
   One nice idea from your PR that #132 does **not** adopt: withholding 
`segments-sent` while disconnected to apply backpressure at span creation 
(`DummyContext`). #132 instead keeps the limiter resetting and relies on the 
bounded buffer so brief outages still retain recent traces — but your 
backpressure approach is worth considering as a follow-up refinement.
   
   Closing in favor of #132. Thank you for the thorough investigation and the 
heap dumps — they made the root cause clear.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to