Conversation
* main: feat: Optional Jet Compose (#402) feat: Android Incremental Image Diff compression (#390) chore: add CLAUDE.md (#398) chore: release main (#400) fix: correct react native session replay build step (#399) chore: release main (#396) fix: Android span e2e tests (#397) fix: improve network response capture (#379) # Conflicts: # sdk/@launchdarkly/mobile-dotnet/.vscode/tasks.json
* main: chore: release main (#401)
(cherry picked from commit 9901600)
* andrey/hooks: comment identify stuff fat working working can launch
...ility-android/lib/src/main/kotlin/com/launchdarkly/observability/plugin/ObservabilityHook.kt
Show resolved
Hide resolved
...ty-android/lib/src/main/kotlin/com/launchdarkly/observability/replay/SessionReplayService.kt
Show resolved
Hide resolved
| // put wake up in the try/catch do not break buffering logic | ||
| logger.error(e) | ||
| } | ||
| } |
There was a problem hiding this comment.
Wake-up failure leaks payload ID counter increment
Low Severity
wakeUpEvents calls nextPayloadId() inside its own try-catch, so if the wake-up pushPayload fails, the exception is swallowed and the outer rollback logic never executes. This means payloadIdCounter keeps its incremented value even though the payload was never delivered, creating a gap in the sequence of payload IDs sent to the server.
| .anonymous(true) | ||
| .build() | ||
|
|
||
| //LDClient.get().identify(anonContext) |
There was a problem hiding this comment.
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 2 potential issues.
There are 4 total unresolved issues (including 2 from previous reviews).
Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, have a team admin enable autofix in the Cursor dashboard.
| #elif ANDROID | ||
| var nativeTracer = LDObserveBridgeAdapter.Tracer; | ||
| _adapter = nativeTracer != null ? new TraceBuilderAdapter(nativeTracer) : null; | ||
| #endif |
There was a problem hiding this comment.
Exporter singleton permanently drops spans if initialized early
High Severity
LDTraceExporter captures the native tracer reference in its constructor and stores it in a readonly field. Since it's created inside the LDTracer lazy singleton, this constructor runs exactly once. If the native SDK hasn't finished initializing when LDTracer.Instance is first accessed, _adapter will be null permanently, and all C#-originated spans will be silently dropped forever (the Export method returns ExportResult.Success even when _adapter is null). The adapter lookup needs to be deferred to export time or support re-initialization.
Additional Locations (1)
| } | ||
|
|
||
| otelRUM = rumBuilder.build() | ||
| sessionManager = capturedSessionManager!! |
There was a problem hiding this comment.
Force-unwrap on nullable sessionManager may crash
Medium Severity
capturedSessionManager!! will throw a NullPointerException if the ld-session-manager-bridge instrumentation's install callback was never invoked during rumBuilder.build(). If OpenTelemetry RUM skips the instrumentation for any reason (e.g., configuration change, initialization error), this causes an unrecoverable crash at startup. A safer approach would handle the null case gracefully.


Summary
How did you test this change?
Are there any deployment considerations?
Note
Medium Risk
Medium risk because it adds a new OpenTelemetry trace-export path from .NET to native (Android/iOS) and refactors plugin initialization/hook wiring, which can affect telemetry correctness and session replay linkage.
Overview
Adds .NET MAUI trace support by introducing an OpenTelemetry
TracerProvider(LDTracer) and exporter (LDTraceExporter/TraceBuilderAdapter) that forwards completedActivityspans into the native SDK via new native tracer/SpanBuilderbridge types.Expands the .NET native bridge to fully implement logs, errors, and metrics on Android/iOS (including attribute conversion/flattening), and refactors initialization by replacing
NativePluginConnectorwith a centralizedPluginOrchestratorplus updated hook exporters for observability and session replay.Updates Android/iOS native layers to support the bridge (new
com.launchdarkly.observability.bridgeAPIs, session replayafterIdentifyproxy, wake-up/reload replay events, and bridge-supplied trace/span ID overrides in the span exporter), and refreshes the MAUI sample/docs (renamed README to Observability, newDialogsPage, richer log attributes, span examples, dependency/version bumps).Written by Cursor Bugbot for commit d586f2e. This will update automatically on new commits. Configure here.