Skip to content

Conversation

@agrognetti
Copy link
Contributor

@agrognetti agrognetti commented Dec 15, 2025

Summary

Refactor the monolithic Options data class into a more granular ObservabilityOptions structure. This change introduces nested classes for TracesApi, MetricsApi, and Instrumentations, and replaces boolean flags (disableLogs, disableTraces, disableMetrics, disableErrorTracking).

  • disableLogs is replaced by logsApiLevel, which allows filtering logs by severity.
  • disableTraces and disableErrorTracking are replaced by tracesApi to control spans and errors separately.
  • disableMetrics is replaced by the metricsApi object.
  • Automatic instrumentations like crash reporting and launch time can now be configured under the instrumentations property.

How did you test this change?

Unit tested

Are there any deployment considerations?

No


Note

Introduces ObservabilityOptions with log-level filtering and per-signal/instrumentation toggles, updating SDK, tests, and sample app to the new API.

  • Core (SDK):
    • Replace Options with new ObservabilityOptions featuring TracesApi, MetricsApi, Instrumentations and LogLevel.
    • Update InstrumentationManager/ObservabilityClient/ObservabilityContext/Observability to use new options.
    • Implement severity-based log exporting via logsApiLevel; gate spans/errors/metrics via tracesApi/metricsApi; toggle crash reporting, activity lifecycle, and launch time instrumentation via instrumentations.
    • Add activity instrumentation suppression and helper to add launch-time instrumentation; remove legacy disable-flag logic.
  • E2E/Tests:
    • Rewrite tests to assert behavior for logsApiLevel, tracesApi includes (errors/spans), metricsApi enabled/disabled, and crash reporting; initialize sampling tests with new options.
  • Sample app:
    • Migrate to ObservabilityOptions in e2e app; adjust default log severity to INFO.
  • Build:
    • Minor dependency organization for OTEL Android/Instrumentations.

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

Refactor the monolithic `Options` data class into a more granular `ObservabilityOptions` structure. This change introduces nested classes for `TracesApi`, `MetricsApi`, and `Instrumentations`, and replaces boolean flags (`disableLogs`, `disableTraces`, `disableMetrics`, `disableErrorTracking`).

-   `disableLogs` is replaced by `logsApiLevel`, which allows filtering logs by severity.
-   `disableTraces` and `disableErrorTracking` are replaced by `tracesApi` to control spans and errors separately.
-   `disableMetrics` is replaced by the `metricsApi` object.
-   Automatic instrumentations like crash reporting and launch time can now be configured under the `instrumentations` property.
@agrognetti agrognetti requested a review from a team as a code owner December 15, 2025 20:44
@agrognetti agrognetti merged commit fbf2ff6 into main Dec 15, 2025
22 checks passed
@agrognetti agrognetti deleted the agrognetti/O11Y-732-options-refactor branch December 15, 2025 21:28
abelonogov-ld added a commit that referenced this pull request Dec 16, 2025
* main:
  chore: Fix existing RRwebGraphQLReplayLogExporterTest tests (#321)
  feat: sanitize URLs + semantic conventions for header attributes (#317)
  refactor: introduce granular ObservabilityOptions (#323)
  refactor: OY11-846 - Add Session Replay plugin (#313)

# Conflicts:
#	sdk/@launchdarkly/observability-android/lib/src/test/kotlin/com/launchdarkly/observability/replay/RRwebGraphQLReplayLogExporterTest.kt
abelonogov-ld added a commit that referenced this pull request Dec 16, 2025
* main:
  feat: Limit accumulating canvas buffer (#322)
  chore: Fix existing RRwebGraphQLReplayLogExporterTest tests (#321)
  feat: sanitize URLs + semantic conventions for header attributes (#317)
  refactor: introduce granular ObservabilityOptions (#323)
  refactor: OY11-846 - Add Session Replay plugin (#313)
  chore: upgrade react-server-dom-webpack to 19.0.3 (#320)
  chore: release main (#319)
  feat: enhance Web Vitals telemetry with semantic attributes (#316)
  chore: release main (#318)
  fix: Android - Remove Disk Buffering (#315)
  chore: readme update with real examples (#314)
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.

3 participants