Implement fallback frame matching by function name and module (Fixes VROOM-5B)#663
Draft
cursor[bot] wants to merge 3 commits intomainfrom
Draft
Implement fallback frame matching by function name and module (Fixes VROOM-5B)#663cursor[bot] wants to merge 3 commits intomainfrom
cursor[bot] wants to merge 3 commits intomainfrom
Conversation
Fixes VROOM-5B This commit adds fallback frame matching functionality to handle cases where the fingerprint computed by the client SDK doesn't match any frame in the profile data due to differences in fingerprint computation. Key changes: - Added FindFrameByFingerprintWithFallback() helper function in frame package that tries alternative fingerprint calculations (raw package, file, module variations) when exact fingerprint match fails - Updated GetFrameWithFingerprint() in SampleChunk, AndroidChunk, sample.Profile, and profile.Android to use fallback matching - Added structured logging to track when fallback matching is used, including target fingerprint, matched frame details, and profile/chunk IDs for debugging - Added comprehensive tests for the fallback matching functionality - Graceful degradation: if both exact and fallback matching fail, returns the existing ErrFrameNotFound error The fallback approach computes fingerprint variations for each frame by trying different normalizations of module/package names (raw package path, file path, empty module, etc.) to account for differences in how client SDKs and vroom compute fingerprints.
- Run gofmt on all modified files - Add period to comment in frame_fallback_test.go
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.
Description
This PR implements fallback frame matching by function name and module to fix the issue where a regressed function's fingerprint doesn't match any frame in the profile data.
Problem
When the client sends a regressed function payload with a fingerprint,
GetFrameWithFingerprintfails to find a matching frame because:trimPackagebehavior)This results in the error "Unable to find matching frame" and the regressed function is skipped.
Solution
Implemented a multi-tiered fallback approach:
Key Changes
FindFrameByFingerprintWithFallback()helper function in the frame packageGetFrameWithFingerprint()in:SampleChunk(chunk/sample.go)AndroidChunk(chunk/android.go)sample.Profile(sample/sample.go)profile.Android(profile/android.go)ErrFrameNotFoundTesting
frame_fallback_test.gocovering:Impact
Fixes VROOM-5B