Skip to content

[Issue Reporter Hook] Emit callback with issue report details#904

Merged
FranAguilera merged 5 commits intomainfrom
franjam/crash-hook
Mar 13, 2026
Merged

[Issue Reporter Hook] Emit callback with issue report details#904
FranAguilera merged 5 commits intomainfrom
franjam/crash-hook

Conversation

@FranAguilera
Copy link
Copy Markdown
Contributor

@FranAguilera FranAguilera commented Mar 5, 2026

What

Depends on bitdriftlabs/shared-core#414

Adding crash hook callback option to the configuration object passed to the Capture.Logger.start call

Verification

With gradle-test-app:

  • Trigger crashes and verify log emitted. See session

  • Force a runtime exception within customer callback implementation. Verify internal error is reported. See session here

With bazel release hello-world test app:

With iOS HelloWorld app:

  • With real device, trigger crash. Verify the before send callback is emitted. See session

  • CHANGELOG.md's "Unreleased" section has been updated, if applicable.

@FranAguilera FranAguilera force-pushed the franjam/crash-hook branch 2 times, most recently from 52140f3 to db9c91c Compare March 6, 2026 11:58
Comment thread platform/jvm/capture/src/main/kotlin/io/bitdrift/capture/Configuration.kt Outdated
Comment thread platform/jvm/capture/consumer-rules.pro
Comment thread platform/jvm/core/src/jni.rs Outdated
Comment thread platform/jvm/core/src/jni.rs Outdated
@github-actions
Copy link
Copy Markdown

github-actions bot commented Mar 12, 2026

Size Comparison Report (x86_64)

Metric APK (KB) SO (KB)
Baseline 3402 1276
Current 3406 1280
Difference 4 4

APK size increased by 4 KB. SO size increased by 4 KB.

@FranAguilera FranAguilera force-pushed the franjam/crash-hook branch 2 times, most recently from 6fca118 to 5434ad8 Compare March 12, 2026 17:29
@FranAguilera FranAguilera requested review from murki and snowp March 12, 2026 17:34
@github-actions
Copy link
Copy Markdown

github-actions bot commented Mar 13, 2026

Android Benchmark Results

Device: PR: Emulator - Android SDK built for x86_64 (API 31) | main: Emulator - Android SDK built for x86_64 (API 31)

Note: Benchmarks run on emulator. Results may vary between runs and may differ from physical devices.

Allocations

Test PR main Δ
logHttpNetworkLog50FieldsAndHeadersAndFieldProviders 920 920 0.0%
logNotMatched10Fields 18 17 +5.9%
logNotMatched5000Fields 10 10 0.0%
logNotMatched5Fields 11 12 -8.3%
logNotMatchedNoFields 1 1 0.0%
trackSpansWithFields 136 136 0.0%
trackSpansWithoutFields 55 55 0.0%
webViewBridgeBridgeReady 60 61 -1.6%
webViewBridgeCustomLog 66 66 0.0%
webViewBridgeInvalidJson 38 38 0.0%
webViewBridgeWebVitalCLS 176 176 0.0%

Timing

Test PR main Δ
logHttpNetworkLog50FieldsAndHeadersAndFieldProviders 237.82 us 233.76 us +1.7%
logNotMatched10Fields 5.99 us 5.88 us +1.8%
logNotMatched5000Fields 2.45 ms 2.42 ms +1.3%
logNotMatched5Fields 3.29 us 4.87 us -32.5%
logNotMatchedNoFields 446 ns 453 ns -1.5%
trackSpansWithFields 480.84 us 472.90 us +1.7%
trackSpansWithoutFields 7.77 us 7.70 us +1.0%
webViewBridgeBridgeReady 7.74 us 7.90 us -2.0%
webViewBridgeCustomLog 10.26 us 9.16 us +12.1%
webViewBridgeInvalidJson 85.03 us 81.53 us +4.3%
webViewBridgeWebVitalCLS 20.52 us 21.08 us -2.7%

@FranAguilera FranAguilera force-pushed the franjam/crash-hook branch 6 times, most recently from 331a6fb to 24791c4 Compare March 13, 2026 10:55
@FranAguilera FranAguilera marked this pull request as ready for review March 13, 2026 11:46
throwable: Throwable,
) {
Log.e(LOG_TAG, message, throwable)
getInternalLogger()?.logInternalError(throwable) { message }
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

i can't find where this method is defined, is this sending a report to our sdk errors endpoint, or actually logging and internal error log in timeline? (it should be the former)

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

log an error in timeline

Copy link
Copy Markdown
Contributor Author

@FranAguilera FranAguilera Mar 13, 2026

Choose a reason for hiding this comment

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

it's defined here and implemented here

Copy link
Copy Markdown
Contributor

@murki murki left a comment

Choose a reason for hiding this comment

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

lgtm!

@FranAguilera FranAguilera enabled auto-merge (squash) March 13, 2026 15:59
@FranAguilera FranAguilera merged commit b154645 into main Mar 13, 2026
17 checks passed
@FranAguilera FranAguilera deleted the franjam/crash-hook branch March 13, 2026 16:12
@github-actions github-actions bot locked and limited conversation to collaborators Mar 13, 2026
@FranAguilera FranAguilera restored the franjam/crash-hook branch March 13, 2026 16:50
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants