Skip to content

fix: observability instance already exists#121

Merged
mario-launchdarkly merged 2 commits intomainfrom
fix/kscrash-already-installed
Jan 15, 2026
Merged

fix: observability instance already exists#121
mario-launchdarkly merged 2 commits intomainfrom
fix/kscrash-already-installed

Conversation

@mario-launchdarkly
Copy link
Copy Markdown
Contributor

@mario-launchdarkly mario-launchdarkly commented Jan 15, 2026

Note

Prevents multiple runtime initializations of Observability and enables identity checks for safe setup.

  • Make Observe class-bound by adding AnyObject to allow === identity checks
  • Convert ObservabilityClientFactory.noOp to a static singleton and use it as the default in LDObserve
  • Add guard in Observability.register to compare LDObserve.shared.client === ObservabilityClientFactory.noOp and throw PluginError.observabilityInstanceAlreadyExist if already initialized
  • Introduce PluginError with user-facing error description

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

@mario-launchdarkly mario-launchdarkly merged commit 8a03120 into main Jan 15, 2026
5 checks passed
@mario-launchdarkly mario-launchdarkly deleted the fix/kscrash-already-installed branch January 15, 2026 22:15
abelonogov-ld pushed a commit that referenced this pull request Jan 16, 2026
🤖 I have created a release *beep* *boop*
---


##
[0.17.0](0.16.0...0.17.0)
(2026-01-16)


### Features

* Add diagnostic of service version starting
([#119](#119))
([8264275](8264275))
* Event queue early stop in buffer overflow
([#118](#118))
([4be2201](4be2201))
* SR manual start/stop
([#124](#124))
([c4e1afb](c4e1afb))


### Bug Fixes

* crash reporting with kscrash not captured
([#122](#122))
([88e97f9](88e97f9))
* observability instance already exists
([#121](#121))
([8a03120](8a03120))

---
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.17.0**
> 
> - Adds diagnostic of service version at start, event queue early stop
on buffer overflow, and Session Replay manual start/stop
> - Fixes KSCrash reports not captured and "observability instance
already exists" error
> - Bumps version to `0.17.0` in `CHANGELOG.md`,
`.release-please-manifest.json`, podspecs, and
`Sources/LaunchDarklyObservability/Version.swift`
> 
> <sup>Written by [Cursor
Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit
d5a714b. This will update automatically
on new commits. Configure
[here](https://cursor.com/dashboard?tab=bugbot).</sup>
<!-- /CURSOR_SUMMARY -->
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