feat: logging_config-based remote logging control, SDK version gating, and rename#2551
Closed
abdulraqeeb33 wants to merge 21 commits intoar-otel-crash-reportingfrom
Closed
feat: logging_config-based remote logging control, SDK version gating, and rename#2551abdulraqeeb33 wants to merge 21 commits intoar-otel-crash-reportingfrom
abdulraqeeb33 wants to merge 21 commits intoar-otel-crash-reportingfrom
Conversation
Co-authored-by: AR Abdul Azeez <abdul@onesignal.com>
Co-authored-by: github-actions[bot] <noreply@onesignal.com>
Co-authored-by: AR Abdul Azeez <abdul@onesignal.com>
Co-authored-by: AR Abdul Azeez <abdul@onesignal.com>
…#2537) Co-authored-by: AR Abdul Azeez <abdul@onesignal.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: AR Abdul Azeez <abdul@onesignal.com> Co-authored-by: Nan <nan@onesignal.com> Co-authored-by: Fadi George <fadii925@gmail.com> Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com> # Conflicts: # Examples/OneSignalDemo/app/src/main/java/com/onesignal/sdktest/application/MainApplicationKT.kt
… gating - Derive isRemoteLoggingEnabled from log_level presence in logging_config (empty object = disabled, has log_level = enabled) - Add OtelSdkSupport utility for testable SDK version checks (API 26+) - Gate all Otel initialization (crash, ANR, remote logging) on both SDK support and backend config - Rename OneSignalCrashLogInit to OneSignalOtelInit to reflect full scope - Simplify OneSignalCrashHandlerFactory with require() instead of no-op - Add crash test button in demo app SecondaryActivity - Fix Compose compiler plugin compatibility with AGP 8.8.2 - Add flow chart documentation for init sequence Co-authored-by: Cursor <cursoragent@cursor.com>
Contributor
|
Theres a lot of sdk example app code that makes it hard to review, you shouldve merged to the base branch instead (ar-otel-crash-reporting) |
Contributor
Author
|
closing this PR as i have the other one thats much cleaner |
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
isRemoteLoggingEnabledis now derived from the presence of a validlog_levelinlogging_config— empty object ({}) means disabled (not on allowlist),{"log_level": "ERROR"}means enabled. Removes the need for a separateisEnabledfield from the server; the field is kept as a derived convenience on the model.isSupportedwithout Robolectric@Config.require()— callers must verify SDK support first; no more silent no-op handler.Key behavior
ConfigModelStoreListener.start()Test plan
resolveRemoteLoggingEnabled()returnstruewhenlogLevelis present and validresolveRemoteLoggingEnabled()returnsfalsewhenlogging_configis emptyMade with Cursor
This change is