feat(telemetry): emit compile events with page/component/state breakdown#6507
feat(telemetry): emit compile events with page/component/state breakdown#6507FarhanAliRaza wants to merge 4 commits into
Conversation
Capture per-compile telemetry (trigger, duration, page/component/state counts, plugin usage, sanitized exception) so we can see how Reflex apps are actually built. Backend-only and short-circuited compiles are excluded so the event tracks real frontend builds.
Merging this PR will not alter performance
Comparing Footnotes
|
Greptile SummaryThis PR adds a
Confidence Score: 4/5Safe to merge; telemetry errors are fully swallowed so the new code cannot affect compilation outcomes. The change is well-structured and well-tested. The main gap is that features_used is defined, exposed in the schema, and tested with manual population, but nothing in this PR actually writes to it during a real compile. Additionally, hot-reload recompilations will emit trigger:null since no hot_reload variant exists in CompileTrigger. reflex/utils/telemetry_context.py (missing hot_reload trigger variant, missing unit comment) and reflex/utils/telemetry_accounting.py (features_used always empty). Important Files Changed
Reviews (1): Last reviewed commit: "feat(telemetry): emit compile events wit..." | Re-trigger Greptile |
Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>
Dev backend workers re-run App.__call__ on each uvicorn/granian reload. A marker file under the web dir, written after the first worker boot, lets subsequent compiles in the same dev session report as hot_reload instead of backend_startup.
…unting - Consolidate dev backend reload-marker handling into a single ``get_backend_compile_trigger`` that atomically claims the marker, so a failed first compile is still treated as backend_startup on the retry. - Bucket memo wrappers under the user-authored component via ``_wrapped_component_type`` to keep telemetry cardinality bounded. - Skip framework-internal states when walking the state tree but descend through them so user subclasses (e.g. ``SharedState``) still surface.
Capture per-compile telemetry (trigger, duration, page/component/state counts, plugin usage, sanitized exception) so we can see how Reflex apps are actually built. Backend-only and short-circuited compiles are excluded so the event tracks real frontend builds.
All Submissions:
Type of change
Please delete options that are not relevant.
New Feature Submission:
Changes To Core Features: