Skip to content

Conversation

@agrognetti
Copy link
Contributor

@agrognetti agrognetti commented Dec 5, 2025

Summary

  • Introduces the Session Replay plugin for the LaunchDarkly Android SDK, allowing session recording as an extension to Observability.
  • Refactors plugin and instrumentation management by adding PluginManager and InstrumentationContributor, removes direct instrumentation from Options, and updates ObservabilityClient and InstrumentationManager to support plugin-contributed instrumentations.
  • Updates documentation and sample usage to reflect the new plugin architecture. Also bumps launchdarkly-android-client-sdk dependency to 5.9.2.

How did you test this change?

  • Unit tests added

Note

Adds Session Replay plugin and refactors Observability to install plugin-contributed instrumentations; updates docs, sample app, and bumps dependencies.

  • SDK/Plugins:
    • Session Replay: New SessionReplay plugin with ReplayInstrumentation and ReplayOptions; integrates via InstrumentationContributor.
    • Observability: Defers initialization to onPluginsReady, exposes LDObserve.context, and installs instrumentations from InstrumentationContributorManager.
    • API Changes: Remove Options.instrumentations; add ObservabilityContext for cross-plugin sharing.
    • Instrumentation Routing: ObservabilityClient/InstrumentationManager accept List<LDExtendedInstrumentation> and route logs via RoutingLogRecordProcessor.
  • Infrastructure:
    • Add InstrumentationContributor interface and InstrumentationContributorManager for per-LDClient registration.
  • Docs/Sample:
    • README: Document enabling Session Replay and masking APIs.
    • E2E app: Adds SessionReplay after Observability in LDConfig setup.
  • Dependencies:
    • Bump launchdarkly-android-client-sdk to 5.10.0; upgrade Kotlin to 2.2.0.
  • Tests:
    • New unit tests for instrumentation routing, contributor manager, and session replay registration/creation.

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

Introduces the Session Replay plugin for the LaunchDarkly Android SDK, allowing session recording as an extension to Observability.
Refactors plugin and instrumentation management by adding PluginManager and InstrumentationContributor, removes direct instrumentation from Options, and updates ObservabilityClient and InstrumentationManager to support plugin-contributed instrumentations.
Updates documentation and sample usage to reflect the new plugin architecture. Also bumps launchdarkly-android-client-sdk dependency to 5.9.2.
@agrognetti agrognetti added the kotlin Pull requests that update kotlin code label Dec 5, 2025
@agrognetti agrognetti marked this pull request as ready for review December 12, 2025 03:55
@agrognetti agrognetti requested a review from a team as a code owner December 12, 2025 03:55
Copy link
Contributor

@abelonogov-ld abelonogov-ld left a comment

Choose a reason for hiding this comment

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

There are missing step:
backendUrl and logAdapter are not being passed into ReplayInstrumentation from Obs module.

…onContributorManager

  - Remove PluginManager and introduce InstrumentationContributorManager to register/retrieve contributors per LDClient.
  - Update Observability to collect instrumentations from registered contributors.
  - Add ObservabilityContext and expose it via LDObserve.context so dependent plugins (e.g. Session Replay) can access config/dependencies.
  - Update SessionReplay, ReplayInstrumentation, and ReplayOptions to follow the new flow.
  - Update tests: add InstrumentationContributorManagerTest and adjust SessionReplayTest to use LDObserve.context/Timber.
@agrognetti agrognetti merged commit 63dcf12 into main Dec 15, 2025
22 checks passed
@agrognetti agrognetti deleted the agrognetti/O11Y-846-session-replay-plugin branch December 15, 2025 17:08
abelonogov-ld added a commit that referenced this pull request Dec 16, 2025
* main:
  chore: Fix existing RRwebGraphQLReplayLogExporterTest tests (#321)
  feat: sanitize URLs + semantic conventions for header attributes (#317)
  refactor: introduce granular ObservabilityOptions (#323)
  refactor: OY11-846 - Add Session Replay plugin (#313)

# Conflicts:
#	sdk/@launchdarkly/observability-android/lib/src/test/kotlin/com/launchdarkly/observability/replay/RRwebGraphQLReplayLogExporterTest.kt
abelonogov-ld added a commit that referenced this pull request Dec 16, 2025
* main:
  feat: Limit accumulating canvas buffer (#322)
  chore: Fix existing RRwebGraphQLReplayLogExporterTest tests (#321)
  feat: sanitize URLs + semantic conventions for header attributes (#317)
  refactor: introduce granular ObservabilityOptions (#323)
  refactor: OY11-846 - Add Session Replay plugin (#313)
  chore: upgrade react-server-dom-webpack to 19.0.3 (#320)
  chore: release main (#319)
  feat: enhance Web Vitals telemetry with semantic attributes (#316)
  chore: release main (#318)
  fix: Android - Remove Disk Buffering (#315)
  chore: readme update with real examples (#314)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

kotlin Pull requests that update kotlin code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants