Skip to content

WIP Android testing#421

Open
abelonogov-ld wants to merge 44 commits intomainfrom
andrey/recordlog
Open

WIP Android testing#421
abelonogov-ld wants to merge 44 commits intomainfrom
andrey/recordlog

Conversation

@abelonogov-ld
Copy link
Contributor

@abelonogov-ld abelonogov-ld commented Mar 12, 2026

Summary

How did you test this change?

Are there any deployment considerations?


Note

Medium Risk
Changes the native observability hook wiring (renames/restructures the proxy into a single cached exporter) and alters Android dictionary conversion/types, which could affect hook invocation and native option interop at runtime.

Overview
Simplifies native observability hook integration by replacing the list-based GetNativeHooks()/NativeHookProxy approach with a single lazily-resolved NativeHookExporter used by ObservabilityHook for evaluation/identify callbacks.

On Android, updates DictionaryTypeConverters.ToJavaHashMap to return a managed IDictionary<string, Java.Lang.Object> (instead of Java.Util.HashMap) and changes population semantics accordingly, affecting how options.Attributes are passed into native Android observability options.

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

* 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
(cherry picked from commit f883e975ca79da891b4178d8a12e27868f0931eb)
* main:
  chore: release main (#401)
(cherry picked from commit 9901600)
* main:
  chore: release main (#406)
  feat: Make Android SDK35 compilable (#405)
* andrey/hooks:
  comment identify stuff
  fat working
  working
  can launch
* main:
  fix: ldclient dependencies (#407)
* main:
  chore: release main (#419)
  feat: Use C and NEON for hashing (Optimization) 100x on Pixel 8 (#415)
  chore: release main (#418)
  feat: Android SR use Jpeg 0.3 quality (#417)
  chore: release main (#411)
  feat: CPU utilization optimization in image diff calculations (#414)
  fix: reset nodeIds during fullsnapshot (#412)
  chore: Android benchmark screen of SR data pipelines on iOS Raw Frames (#410)
  feat: Android Observability hook  proxy for MAUI (#409)
  feat: ruby observability plugin (#360)

# Conflicts:
#	sdk/@launchdarkly/mobile-dotnet/android/native/LDObserve/src/main/java/com/example/LDObserve/ObservabilityBridge.kt
#	sdk/@launchdarkly/mobile-dotnet/macios/native/LDObserve/Sources/ObservabilityBridge.swift
#	sdk/@launchdarkly/mobile-dotnet/observability/LDAPI/LDObserve.cs
#	sdk/@launchdarkly/mobile-dotnet/observability/LDObservability.Fat.csproj
#	sdk/@launchdarkly/mobile-dotnet/observability/LDObservability.csproj
#	sdk/@launchdarkly/mobile-dotnet/observability/bridge/LDObserve.cs
#	sdk/@launchdarkly/mobile-dotnet/observability/bridge/NativeHookProxy.cs
#	sdk/@launchdarkly/mobile-dotnet/observability/observe/api/LDObserve.cs
#	sdk/@launchdarkly/mobile-dotnet/observability/observe/plugin/ObservabilityHook.cs
#	sdk/@launchdarkly/mobile-dotnet/observability/observe/plugin/ObservabilityPlugin.cs
#	sdk/@launchdarkly/mobile-dotnet/observability/replay/plugin/SessionReplayHook.cs
#	sdk/@launchdarkly/mobile-dotnet/observability/replay/plugin/SessionReplayPlugin.cs
#	sdk/@launchdarkly/mobile-dotnet/sample/MauiProgram.cs
* main:
  feat: mobile-dotnet support init attributes (#420)

# Conflicts:
#	sdk/@launchdarkly/mobile-dotnet/observability/LDObservability.Fat.csproj
#	sdk/@launchdarkly/mobile-dotnet/observability/LDObservability.csproj
#	sdk/@launchdarkly/mobile-dotnet/observability/bridge/DictionaryTypeConverters.cs
@abelonogov-ld abelonogov-ld requested a review from a team as a code owner March 12, 2026 01:15
Copy link

@cursor cursor bot left a comment

Choose a reason for hiding this comment

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

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, have a team admin enable autofix in the Cursor dashboard.

{
var jobj = ToJavaObject(v);
if (jobj != null) map.Put(k, jobj);
if (jobj != null) map[k] = jobj;
Copy link

Choose a reason for hiding this comment

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

ToJavaHashMap returns C# Dictionary instead of Java HashMap

High Severity

ToJavaHashMap now returns a C# Dictionary<string, Java.Lang.Object> instead of Java.Util.HashMap. The Kotlin LDObservabilityOptions constructor expects HashMap<String, Any?>?, and the MAUI Android binding maps this to Java.Util.HashMap. In LDNative.Android.cs, the result of ToJavaHashMap is passed directly to this constructor, causing a type mismatch since C# Dictionary does not extend Java.Util.HashMap.

Fix in Cursor Fix in Web

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.

1 participant