Skip to content

Conversation

@gignat-dev
Copy link
Contributor

Updates the condition in usingNamedTrack(from PerfettoTrackEventBuilder.java) to also check id and parentUuid before reusing a cached NamedTrack instance. This ensures tracks with the same name but different IDs or parent UUIDs are treated as distinct.

Added new test cases in PerfettoTraceTest.java (testTwoNamedTrackWithDifferentIds, testTwoNamedTrackWithDifferentParentUuids) to validate that distinct tracks are created when IDs or parent UUIDs differ for the same name.

Test: bazelisk test //:src_android_sdk_java_test_perfetto_trace_instrumentation_test

Updates the condition in `usingNamedTrack`(from `PerfettoTrackEventBuilder.java`) to also check `id` and `parentUuid` before reusing a cached `NamedTrack` instance. This ensures tracks with the same name but different IDs or
parent UUIDs are treated as distinct.

Added new test cases in `PerfettoTraceTest.java` (`testTwoNamedTrackWithDifferentIds`, `testTwoNamedTrackWithDifferentParentUuids`) to validate that distinct tracks are created when IDs or parent UUIDs differ for the same name.

Test: bazelisk test //:src_android_sdk_java_test_perfetto_trace_instrumentation_test
@gignat-dev gignat-dev requested a review from a team as a code owner November 4, 2025 10:38
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