Skip to content

Conversation

@jsonbailey
Copy link
Contributor

@jsonbailey jsonbailey commented Dec 5, 2025

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.

  • Streaming/Diagnostics:
    • lib/ldclient-rb/stream.rb (StreamProcessor):
      • Accepts/retains @diagnostic_accumulator and logs connection start/result via record_stream_init with timestamp, failure flag, and duration.
      • Calls log_connection_started on stream start; records success/failure once per attempt.
    • lib/ldclient-rb/events.rb (EventDispatcher): always assigns @diagnostic_accumulator (removes opt-out gating).
  • Tests:
    • spec/stream_spec.rb: add specs covering success/failure logging, timestamp/duration validation, single-log per attempt, and nil accumulator behavior.
  • CI:
    • .github/actions/setup/action.yml: pin Bundler to 2 in setup step.

Written by Cursor Bugbot for commit 8b2f035. This will update automatically on new commits. Configure here.

@jsonbailey jsonbailey requested a review from a team as a code owner December 5, 2025 21:41
def initialize(inbox, sdk_key, config, diagnostic_accumulator, event_sender)
@sdk_key = sdk_key
@config = config
@diagnostic_accumulator = config.diagnostic_opt_out? ? nil : diagnostic_accumulator
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The client is responsible for determining if we pass the diagnostic accumulator to the rest of the system based on the opt_out value. This makes the check here redundant and unnecessary.

@jsonbailey jsonbailey merged commit d49eaa8 into main Dec 5, 2025
11 checks passed
@jsonbailey jsonbailey deleted the jb/fix-diagnostic-accumulator branch December 5, 2025 22:56
jsonbailey pushed a commit that referenced this pull request Dec 5, 2025
🤖 I have created a release *beep* *boop*
---


##
[8.11.2](8.11.1...8.11.2)
(2025-12-05)


### Bug Fixes

* Fix diagnostic logging for connection results in stream
([#343](#343))
([d49eaa8](d49eaa8))
* Prevent command injection in FileDataSourceImpl
([#341](#341))
([9ca4b98](9ca4b98))

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).

<!-- CURSOR_SUMMARY -->
---

> [!NOTE]
> Bumps SDK to 8.11.2, updates changelog with two bug fixes, and
refreshes provenance instructions.
> 
> - **Version bump**:
>   - Update `lib/ldclient-rb/version.rb` to `8.11.2`.
>   - Update `.release-please-manifest.json` to `8.11.2`.
>   - Update `PROVENANCE.md` `SDK_VERSION` to `8.11.2`.
> - **Documentation**:
> - Add `8.11.2` entry to `CHANGELOG.md` noting bug fixes: diagnostic
logging for stream connection results; prevent command injection in
`FileDataSourceImpl`.
> 
> <sup>Written by [Cursor
Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit
bbadc19. This will update automatically
on new commits. Configure
[here](https://cursor.com/dashboard?tab=bugbot).</sup>
<!-- /CURSOR_SUMMARY -->

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
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.

3 participants