Skip to content

feat: Android O11Y cost based buffering + JSON exporters#525

Merged
abelonogov-ld merged 6 commits intomainfrom
andrey/json-exporters
May 5, 2026
Merged

feat: Android O11Y cost based buffering + JSON exporters#525
abelonogov-ld merged 6 commits intomainfrom
andrey/json-exporters

Conversation

@abelonogov-ld
Copy link
Copy Markdown
Contributor

@abelonogov-ld abelonogov-ld commented May 4, 2026

Summary

  • Reusing Cost Based Buffering for O11Y from SR (matching Swift)
  • Drop Protobuf in favor JSON (matching Swift)

How did you test this change?

Are there any deployment considerations?


Note

Medium Risk
Replaces OpenTelemetry’s built-in OTLP exporters/processors with a new queued, cost-based batching pipeline and a custom OTLP/HTTP+JSON client, which could affect telemetry delivery, sampling, and flush semantics. Also changes the public Observe.flush() signature to non-blocking Unit, requiring downstream callers to update.

Overview
Switches Android observability export to a cost-based buffered queue shared across logs, traces, and metrics (via EventQueue + BatchWorker), aligning behavior with the Swift implementation.

Replaces OTLP Protobuf exporters with custom OTLP/HTTP+JSON exporters (OtlpHttpClient + per-signal JSON adapters/models) and rewires ObservabilityService to enqueue log/span/metric payloads (EventLogRecordProcessor, EventSpanProcessor, EventMetricExporter) while keeping debug/inspector exporters as optional delegates.

Updates Observe.flush() (and LDObserve) to be non-blocking and removes prior processor force-flush aggregation; adds Kotlin compiler/runtime pinning in Gradle and refactors gzip compression into GzipUtil, with new unit tests covering the new queueing/export/JSON encoding behavior.

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

@abelonogov-ld abelonogov-ld requested a review from a team as a code owner May 4, 2026 20:07
Copy link
Copy Markdown

@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.

Fix All in Cursor

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

Reviewed by Cursor Bugbot for commit 095be57. Configure here.

@abelonogov-ld abelonogov-ld merged commit 01e6b07 into main May 5, 2026
24 checks passed
@abelonogov-ld abelonogov-ld deleted the andrey/json-exporters branch May 5, 2026 00:01
abelonogov-ld pushed a commit that referenced this pull request May 5, 2026
🤖 I have created a release *beep* *boop*
---


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

##
[0.44.0](launchdarkly-observability-android-0.43.0...launchdarkly-observability-android-0.44.0)
(2026-05-05)


### Features

* Android O11Y cost based buffering + JSON exporters
([#525](#525))
([01e6b07](01e6b07))
</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]
> **Low Risk**
> Low risk: this PR only updates release metadata (version numbers and
changelog) and does not modify runtime code. Any risk is limited to
publishing the new Android artifact version.
> 
> **Overview**
> Publishes `sdk/@launchdarkly/observability-android` **v0.44.0** by
updating the version in `.release-please-manifest.json` and
`gradle.properties`.
> 
> Adds the `0.44.0` entry to `CHANGELOG.md`, noting the new Android
observability cost-based buffering and JSON exporter feature.
> 
> <sup>Reviewed by [Cursor Bugbot](https://cursor.com/bugbot) for commit
ae3288f. 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