feat(ui-logging): add PROPS_UPDATED event logging for watched prop changes#639
Draft
bhabalan wants to merge 1 commit intowebex:nextfrom
Draft
feat(ui-logging): add PROPS_UPDATED event logging for watched prop changes#639bhabalan wants to merge 1 commit intowebex:nextfrom
bhabalan wants to merge 1 commit intowebex:nextfrom
Conversation
…anges Add logPropsUpdated method to @webex/cc-ui-logging that tracks changes to specified props and logs a PROPS_UPDATED metric event. The withMetrics HOC now accepts an optional propsToWatch parameter to selectively monitor important props while ignoring frequently changing ones like timers. CAI-6890
|
This pull request is automatically being deployed by Amplify Hosting (learn more). |
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.
COMPLETES
https://jira-eng-sjc12.cisco.com/jira/browse/CAI-6890
This pull request addresses
The widgets currently record mount and unmount metrics, but do not track when important props change. Frequently changing props like timers would pollute the logs, so we need a selective approach that only logs changes to specified "important" props.
by making the following changes
logPropsUpdated()method in@webex/cc-ui-loggingthat logs aPROPS_UPDATEDmetric event when specified props changewithMetrics()HOC to accept an optional third parameterpropsToWatch: string[]logPropsUpdatedon re-render when watched props changelogPropsUpdatedfrom the package index for direct uselogPropsUpdated, 4 for HOC integration) — all passing at 98%+ coverageChange Type
The following scenarios were tested
The GAI Coding Policy And Copyright Annotation Best Practices
Checklist before merging
Make sure to have followed the contributing guidelines before submitting.