feat(instrumentation): Add binder IPC call tracing#1159
Draft
feat(instrumentation): Add binder IPC call tracing#1159
Conversation
…acer adapter presence The SentryIpcTracer adapter class is introduced in sentry-java 8.40.0 (getsentry/sentry-java#5326). Bump VERSION_BINDER_IPC so the instrumentation no-ops when the adapter is not present on the classpath. Adds unit test coverage for the registry lookup and the ASM visitor (tracer wrapping, static vs instance handling, non-binder pass-through). Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
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
SentryIpcTracer.onCallStart/onCallEndcalls so the SDK can emit spans/metrics for cross-process hops.io.sentry.android.core.SentryIpcTraceris added in feat(android): binder IPC tracing adapter for Gradle plugin instrumentation sentry-java#5326 and will ship in sentry-java 8.40.0. Instrumentation no-ops whensentry-android-core < 8.40.0(standardSentryVersionsgate).tracingInstrumentation.binderIpc.enabledextension property, defaults totrue.Test plan
./gradlew :plugin-build:test --tests "io.sentry.android.gradle.instrumentation.binder.*"(9 tests, all pass)BinderMethodRegistryTest— registry lookup (unknown owner, unknown method, instance, static, Context subtype coverage)BinderIpcMethodVisitorTest— ASM-level visitor test: wraps known instance + static calls with tracer, emits correct component/method LDC constants, adds try/catch handler, leaves unknown calls and opcode-mismatched calls untouchedspotlessApplycleanRequires
🤖 Generated with Claude Code