Skip to content

fix(observability-android): honor ObservabilityOptions.enabled - #778

Merged
abelonogov-ld merged 2 commits into
mainfrom
andrey/android-observability-enabled
Sep 24, 2026
Merged

abelonogov-ld merged 2 commits into
mainfrom
andrey/android-observability-enabled

Conversation

@abelonogov-ld

@abelonogov-ld abelonogov-ld commented Sep 24, 2026 •

Copy link
Copy Markdown
Contributor

ObservabilityOptions.enabled was declared but never read, so enabled = false still exported every log, span and metric. The service is still built so Session Replay keeps working, but with enabled = false no exporters, processors or metric reader are registered, the batch worker never starts, and crash reporting, launch-time instrumentation and the sampling-config fetch are skipped. This matches iOS, which leaves the service unstarted when isEnabled is false.

Summary

How did you test this change?

Are there any deployment considerations?


Note

Overview
Android observability now respects ObservabilityOptions.enabled = false: the RUM stack still initializes so Session Replay (sessions, screens, taps, launch breadcrumbs) continues, but OTLP exporters, log/span processors, metric readers, the batch worker, crash reporting, launch-time instrumentation, and sampling-config fetch are skipped—matching iOS when disabled.

KDoc on enabled is expanded to describe that behavior. A new Compose E2E test asserts that with enabled = false, no logs/spans/metrics are exported and no OTLP HTTP traffic hits the mock server.

CI: the dependency-scan workflow pins launchdarkly/gh-actions SBOM steps to commit 8e082b23… instead of @main, and sets opa-version: v1.9.0 so policy evaluation does not pull a broken latest OPA binary when GitHub API rate limits return HTML.

Reviewed by Cursor Bugbot for commit 1813342. Bugbot is set up for automated code reviews on this repo. Configure here.

ObservabilityOptions.enabled was declared but never read, so enabled = false
still exported every log, span and metric. The service is still built so
Session Replay keeps working, but with enabled = false no exporters,
processors or metric reader are registered, the batch worker never starts,
and crash reporting, launch-time instrumentation and the sampling-config
fetch are skipped. This matches iOS, which leaves the service unstarted
when isEnabled is false.

Co-authored-by: Cursor <cursoragent@cursor.com>
@abelonogov-ld
abelonogov-ld requested a review from a team as a code owner September 24, 2026 01:01
The evaluate-policy action resolves opa-version 'latest' through an
unauthenticated GitHub API call. When that is rate-limited the tag is
null, curl saves the HTML 404 page as /usr/local/bin/opa, and the result
is cached under opa-null, so the policy step fails with a shell syntax
error. Pin OPA to v1.9.0 (the policy uses 1.x syntax) and pin the actions
to a commit SHA.

Co-authored-by: Cursor <cursoragent@cursor.com>
@abelonogov-ld
abelonogov-ld merged commit 23f5ebc into main Sep 24, 2026
26 checks passed
@abelonogov-ld
abelonogov-ld deleted the andrey/android-observability-enabled branch September 24, 2026 18:08
abelonogov-ld pushed a commit that referenced this pull request Sep 24, 2026
🤖 I have created a release *beep* *boop*
---


<details><summary>launchdarkly-observability-android: 0.68.1</summary>

##
[0.68.1](launchdarkly-observability-android-0.68.0...launchdarkly-observability-android-0.68.1)
(2026-09-24)


### Bug Fixes

* **observability-android:** honor ObservabilityOptions.enabled
([#778](#778))
([23f5ebc](23f5ebc))
</details>

<details><summary>observability-next: 0.2.9</summary>

##
[0.2.9](observability-next-0.2.8...observability-next-0.2.9)
(2026-09-24)


### Bug Fixes

* **observability-next:** require next &gt;=16.3.3 to resolve
GHSA-p293-qw3h-jr36
([#762](#762))
([42dc7ed](42dc7ed))
</details>

---
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]
> **Overview**
> Release Please patch release for
**@launchdarkly/observability-android** **0.68.1** and
**@launchdarkly/observability-next** **0.2.9**, updating
`.release-please-manifest.json`, package/Gradle versions, and
changelogs.
> 
> **Android 0.68.1** documents a bug fix so initialization respects
**`ObservabilityOptions.enabled`**, so observability stays off when that
flag is false.
> 
> **observability-next 0.2.9** documents tightening the Next.js
requirement to **>=16.3.3** to address security advisory
**GHSA-p293-qw3h-jr36** (commit #762); this PR’s visible diff is mainly
the version bump to **0.2.9**.
> 
> <sup>Reviewed by [Cursor Bugbot](https://cursor.com/bugbot) for commit
440aeb1. Bugbot is set up for automated
code reviews on this repo. Configure
[here](https://www.cursor.com/dashboard/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