Skip to content

Rename CrashlyticsOtelContext to PersistenceContext - #4

Merged
mrober merged 6 commits into
mainfrom
mrober/androidCleanup
Sep 25, 2026
Merged

mrober merged 6 commits into
mainfrom
mrober/androidCleanup

Conversation

@mrober

@mrober mrober commented Sep 23, 2026 •

Copy link
Copy Markdown
Collaborator

This cleans up the android_span_data to:

  • Rename CrashlyticsOtelContext to PersistenceContext
  • Refactor code to be more readable
  • Remove liblog since the sdk will be silent
  • Add the .clang-format file

There is a matching PR in the android repo to match the rename

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request refactors src/android_span_data.cpp by removing Android logging, renaming constants and variables to follow snake_case naming conventions, and updating JNI native registrations to target TelemetryContext instead of CrashlyticsOtelContext. Feedback on the changes highlights a critical JNI resource leak where local references (telemetry_clazz and mutable_clazz) are not deleted, and global references are leaked if native registration fails. A code suggestion is provided to properly clean up these references.

Comment thread src/android_span_data.cpp
mghaznav
mghaznav previously approved these changes Sep 23, 2026
mghaznav
mghaznav previously approved these changes Sep 23, 2026
@mrober mrober changed the title Rename CrashlyticsOtelContext to TelemetryContext Rename CrashlyticsOtelContext to PersistenceContext Sep 24, 2026
@mrober
mrober merged commit ab27eb6 into main Sep 25, 2026
12 checks passed
@mrober
mrober deleted the mrober/androidCleanup branch September 25, 2026 13:27
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