-
Notifications
You must be signed in to change notification settings - Fork 1.7k
feat(telemetry): track per-feature usage counters on compile events #6519
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
base: main
Are you sure you want to change the base?
Changes from 1 commit
d361da3
d0bd58f
a6b877d
14a787e
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. [P2] reflex/utils/telemetry_accounting.py (line 270) double-counts inherited client-storage vars. _walk_state_features() walks state_cls.get_fields() for every state returned by _walk_states(), but child states include parent fields there. A root state with c: str = Cookie() and child state with ls: str = LocalStorage() reports cookie_count == 2 and local_storage_count == 1; the cookie is counted once on the root and again through the child’s inherited field. This affects cookie_count, local_storage_count, and session_storage_count for normal state hierarchies. It should probably walk non-inherited fields only, e.g. names from state_cls.base_vars, then resolve those names back to fields.
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. fixed |
Uh oh!
There was an error while loading. Please reload this page.