-
Notifications
You must be signed in to change notification settings - Fork 49
release 1 5 0 #30
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
release 1 5 0 #30
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #30 +/- ##
==========================================
+ Coverage 88.70% 89.66% +0.95%
==========================================
Files 32 32
Lines 1222 1238 +16
Branches 135 153 +18
==========================================
+ Hits 1084 1110 +26
+ Misses 138 128 -10 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR refactors the RUM tool handler for improved performance and clarity by replacing an iterative attribute path extraction with a recursive helper function, and includes test enhancements for grouped event counts and filtering.
- Replace loop-based group path extraction with the new recursive getValueByPath function
- Skip events missing attributes earlier in the iteration
- Remove an unused closing brace for cleaner structure
Files not reviewed (1)
- package.json: Language not supported
Comments suppressed due to low confidence (1)
src/tools/rum/tool.ts:126
- [nitpick] Consider renaming 'groupPath' to something like 'groupByKeys' for improved clarity on its purpose.
const groupPath = groupBy.split('.') as Array<keyof typeof event.attributes.attributes>
| if (typedObj[key] === undefined) { | ||
| return { value: null, found: false } |
Copilot
AI
Apr 20, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If the object property exists but its value is null, the recursive call at line 287 will cast null to a Record<string, unknown>, which can lead to runtime errors. Consider adding an explicit null check to safely handle this scenario.
| if (typedObj[key] === undefined) { | |
| return { value: null, found: false } | |
| if (typedObj[key] === undefined || typedObj[key] === null) { |
- Simplify logic for retrieving group values and enhance performance metric handling. - Introduce a utility function for recursive object value extraction. - Improve error handling for missing RUM data and streamline session ID management. Signed-off-by: katsumata <12413150+winor30@users.noreply.github.com>
- Enhance test coverage for grouped event counts in `rum.test.ts`. - Improve clarity of test descriptions to include application-specific details. - Add robustness to tests by handling various edge cases and invalid scenarios. Signed-off-by: katsumata <12413150+winor30@users.noreply.github.com>
- Enhance testing suite for RUM tools to improve coverage and robustness. - Address various edge cases including empty and invalid data inputs. - Introduce default metric handling and nested metric path scenarios. - Validate functionality with non-numeric metric values to ensure error resilience. Signed-off-by: katsumata <12413150+winor30@users.noreply.github.com>
- Update version number to reflect the latest release. - Prepare for upcoming features and improvements. Signed-off-by: katsumata <12413150+winor30@users.noreply.github.com>
- Refactor metric initialization and attribute extraction for improved code clarity and efficiency. - Enhance the statistics calculation method by implementing functional programming principles. - Improve readability of conditionals when handling missing event attributes. Signed-off-by: katsumata <12413150+winor30@users.noreply.github.com>
- Refactor the `get_rum_page_performance` function for improved clarity and efficiency. - Enhance code readability by replacing an if statement with a conditional expression. Signed-off-by: katsumata <12413150+winor30@users.noreply.github.com>
Uh oh!
There was an error while loading. Please reload this page.