Skip to content

feat: Identify support (OBS + SR)#93

Merged
abelonogov-ld merged 19 commits intomainfrom
andrey/identify-support
Dec 12, 2025
Merged

feat: Identify support (OBS + SR)#93
abelonogov-ld merged 19 commits intomainfrom
andrey/identify-support

Conversation

@abelonogov-ld
Copy link
Copy Markdown
Contributor

@abelonogov-ld abelonogov-ld commented Dec 10, 2025

  • add before and after identify hooks into Obs and SR
  • customerFriendlyName hookup
  • user, canonicalUser hookup
  • SR identify event
  • multi, single, anon user support
image image

Note

Adds Identify lifecycle hooks to Observability and Session Replay, propagating user/canonical keys (with optional friendly name) to logs and SR events, plus refactors and an SDK bump.

  • Observability:
    • Add Options.contextFriendlyName used when recording Identify.
    • Introduce InternalObserve exposing logClient; Observability stores created service.
    • Replace EvalTracingHook with ObservabilityHook; logs LD.identify after Identify with attributes key, canonicalKey, and identify.result.status.
  • Session Replay:
    • Add IdentifyItemPayload (encodes context into attributes) and replace screen payload with ImageItemPayload.
    • SessionReplayEventGenerator emits Custom event with tag Identify; adds Reload payload title from app name.
    • SessionReplayExporter identifies sessions using user attributes (on init and on-demand); stores pending Identify payload.
    • SessionReplayService wires ObservabilityContext, app title (ApplicationProperties.name), and schedules Identify via new SessionReplayHook (after Identify).
    • RRWeb: support CustomDataTag.identify deserialization.
  • Common:
    • Add ApplicationProperties.name (reads CFBundleName).
  • Dependencies:
    • Bump ios-client-sdk to 10.1.0.
  • Test App:
    • Switch to MainMenuView + MainMenuViewModel; add Identify actions (user/multi/anon); set Options.contextFriendlyName in config.

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

* main:
  chore(main): release 0.12.0 (#88)
  fix: Resolve sigabrt crash due that LDClient is not Obj-c class (#89)

# Conflicts:
#	Sources/LaunchDarklyObservability/Plugin/Observability.swift
* main:
  fix: Remove double image workaround for RRWeb (#92)
  fix: hold broadcaster until deinit finishes (#90)
@abelonogov-ld abelonogov-ld changed the title WIP Identify support (OBS + SR) feat: Identify support (OBS + SR) Dec 11, 2025
@abelonogov-ld abelonogov-ld enabled auto-merge (squash) December 12, 2025 01:01
withSpans: true,
withValue: true,
version: options.serviceVersion,
options: options)]
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Bug: Hook receives stale options without SDK metadata

The getHooks method passes self.options (the original immutable options) to ObservabilityHook, but Options is a struct. In register, line 19 creates a local copy with var options = options, modifies it with SDK metadata (version, project ID, service name, etc.), and uses that copy for ObservabilityClientFactory.instantiate. However, the modified copy is discarded when register returns. The hook's beforeEvaluation method uses options.resourceAttributes which will be missing all the SDK metadata that was added in register.

Additional Locations (1)

Fix in Cursor Fix in Web

@abelonogov-ld abelonogov-ld merged commit 432f75c into main Dec 12, 2025
5 checks passed
@abelonogov-ld abelonogov-ld deleted the andrey/identify-support branch December 12, 2025 01:06
abelonogov-ld pushed a commit that referenced this pull request Dec 12, 2025
🤖 I have created a release *beep* *boop*
---


##
[0.13.0](0.12.1...0.13.0)
(2025-12-12)


### Features

* Identify support (OBS + SR)
([#93](#93))
([432f75c](432f75c))

---
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]
> Release 0.13.0 introducing Identify support, with version bumps across
podspecs/manifest and sdkVersion update.
> 
> - **Release 0.13.0**
> - CHANGELOG: add feature entry for Identify support (OBS + SR) in
`CHANGELOG.md`.
> - Version bumps: `s.version` in `LaunchDarklyObservability.podspec`
and `LaunchDarklySessionReplay.podspec` to `0.13.0`; `sdkVersion` in
`Sources/LaunchDarklyObservability/Version.swift` to `0.13.0`.
> - Manifest: update `.` to `0.13.0` in `.release-please-manifest.json`.
> 
> <sup>Written by [Cursor
Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit
9778dec. This will update automatically
on new commits. Configure
[here](https://cursor.com/dashboard?tab=bugbot).</sup>
<!-- /CURSOR_SUMMARY -->
abelonogov-ld added a commit that referenced this pull request Dec 12, 2025
* main:
  chore(main): release 0.13.0 (#96)
  feat: Identify support (OBS + SR) (#93)

# Conflicts:
#	TestApp/Sources/AppDelegate.swift
abelonogov-ld added a commit that referenced this pull request Jan 12, 2026
* main: (38 commits)
  chore(main): release 0.15.2 (#113)
  fix: make unlock await aware (#111)
  Fix SwiftUI hits stealing attempt 2 (#112)
  chore(main): release 0.15.1 (#110)
  fix: ldMask interfere with hit view testing (#108)
  chore(main): release 0.15.0 (#106)
  feat: Deduplicate images before buffering (#107)
  feat: Gzip compression of graphql request (#105)
  chore(main): release 0.14.0 (#103)
  feat: Flush buffers on going to app switcher (#104)
  fix: UIDevice.current.orientation.isLandscape not main thread access (#102)
  feat: Limit accumulating canvas buffer (#101)
  chore: remove disableErrorTracking option (#99)
  chore: remove unused options in observability plugin (#98)
  chore(main): release 0.13.1 (#97)
  fix: Rewrite AppLifeCycleManager onto Combine (#95)
  chore(main): release 0.13.0 (#96)
  feat: Identify support (OBS + SR) (#93)
  chore: Objective-c recordLog  (#94)
  chore(main): release 0.12.1 (#91)
  ...

# Conflicts:
#	Package.swift
#	Sources/LaunchDarklyObservability/Plugin/ObservabilityHook.swift
#	Sources/LaunchDarklyObservability/UIInteractions/TouchIntepreter.swift
#	Sources/Observability/Client/ObservabilityClientFactory.swift
#	Sources/OpenTelemetry/Instrumentation/URLSession/URLSessionLogger.swift
#	TestApp/Sources/AppDelegate.swift
#	TestApp/Sources/MainMenuView.swift
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.

2 participants