fix: MAUI - drop OTel activity instrumentation dependency#651
Open
abelonogov-ld wants to merge 1 commit into
Open
fix: MAUI - drop OTel activity instrumentation dependency#651abelonogov-ld wants to merge 1 commit into
abelonogov-ld wants to merge 1 commit into
Conversation
Remove the io.opentelemetry.android.instrumentation:activity:0.11.0-alpha dependency from the MAUI native Android module so the AAR is no longer copied into the shipped NuGet deps. Also fix ObservabilityBridge, which still passed the long-removed `activityLifecycle` argument to `Instrumentations(...)` (renamed to `analytics.pageViews` in #577). Page views rely on the activity instrumentation AAR we no longer ship, so set `analytics.pageViews = false` to explicitly suppress that instrumentation. Co-authored-by: Cursor <cursoragent@cursor.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
io.opentelemetry.android.instrumentation:activity:0.11.0-alpha(bothimplementationandcopyDependencies) from the MAUI native Android module (LDObserve/build.gradle.kts), so the activity instrumentation AAR is no longer copied into the shipped NuGet deps.ObservabilityBridge, which still passedactivityLifecycle = truetoInstrumentations(...)— a parameter removed in feat: Android track API and productAnalytics options #577 (renamed toanalytics.pageViews). This was a stale reference that no longer compiles against the currentobservability-androidlib.analytics.pageViews = falseso the SDK callssuppressInstrumentation("activity")instead of relying on the instrumentation just being silently absent.Notes
instrumentations.screens/userTapsare left at their defaults (true): screen detection and Session Replay navigation use Android's ownregisterActivityLifecycleCallbacks, not the OTelactivityAAR, so they keep working.observability-android/libstill declares the activity dependency (shared with Flutter); at runtime on MAUI the AAR simply won't be on the classpath and the suppressed instrumentation stays off.Test plan
ObservabilityBridgeno longer references the removedactivityLifecycleparam).outputs/deps/ the produced NuGet.Made with Cursor