Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 14 additions & 1 deletion reflex/utils/telemetry.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,12 @@
from reflex.utils import console
from reflex.utils.decorator import once_unless_none
from reflex.utils.exceptions import ReflexError
from reflex.utils.prerequisites import ensure_reflex_installation_id, get_project_hash
from reflex.utils.prerequisites import (
ensure_reflex_installation_id,
get_bun_version,
get_node_version,
get_project_hash,
)

UTC = timezone.utc
POSTHOG_API_URL: str = "https://app.posthog.com/capture/"
Expand Down Expand Up @@ -122,6 +127,8 @@ class _Properties(TypedDict):
user_os_detail: str
reflex_version: str
python_version: str
node_version: str | None
bun_version: str | None
cpu_count: int
memory: int
cpu_info: dict
Expand Down Expand Up @@ -169,6 +176,12 @@ def _get_event_defaults() -> _DefaultEvent | None:
"user_os_detail": get_detailed_platform_str(),
"reflex_version": get_reflex_version(),
"python_version": get_python_version(),
"node_version": (
str(node_version) if (node_version := get_node_version()) else None
),
"bun_version": (
str(bun_version) if (bun_version := get_bun_version()) else None
),
"cpu_count": get_cpu_count(),
"memory": get_memory(),
"cpu_info": dataclasses.asdict(cpuinfo) if cpuinfo else {},
Expand Down