fix: Fix diagnostic logging for connection results in stream #343
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Tracked internally: SDK-1674
Note
StreamProcessor now records diagnostic connection start/result metrics and tests them; EventDispatcher always keeps the provided diagnostic accumulator; CI action pins Bundler v2.
lib/ldclient-rb/stream.rb(StreamProcessor):@diagnostic_accumulatorand logs connection start/result viarecord_stream_initwith timestamp, failure flag, and duration.log_connection_startedon stream start; records success/failure once per attempt.lib/ldclient-rb/events.rb(EventDispatcher): always assigns@diagnostic_accumulator(removes opt-out gating).spec/stream_spec.rb: add specs covering success/failure logging, timestamp/duration validation, single-log per attempt, and nil accumulator behavior..github/actions/setup/action.yml: pin Bundler to2in setup step.Written by Cursor Bugbot for commit 8b2f035. This will update automatically on new commits. Configure here.