Skip to content

Commit 22155a4

Browse files
authored
track node and bun version (#5375)
1 parent f241d70 commit 22155a4

File tree

1 file changed

+14
-1
lines changed

1 file changed

+14
-1
lines changed

reflex/utils/telemetry.py

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,12 @@
1919
from reflex.utils import console
2020
from reflex.utils.decorator import once_unless_none
2121
from reflex.utils.exceptions import ReflexError
22-
from reflex.utils.prerequisites import ensure_reflex_installation_id, get_project_hash
22+
from reflex.utils.prerequisites import (
23+
ensure_reflex_installation_id,
24+
get_bun_version,
25+
get_node_version,
26+
get_project_hash,
27+
)
2328

2429
UTC = timezone.utc
2530
POSTHOG_API_URL: str = "https://app.posthog.com/capture/"
@@ -122,6 +127,8 @@ class _Properties(TypedDict):
122127
user_os_detail: str
123128
reflex_version: str
124129
python_version: str
130+
node_version: str | None
131+
bun_version: str | None
125132
cpu_count: int
126133
memory: int
127134
cpu_info: dict
@@ -169,6 +176,12 @@ def _get_event_defaults() -> _DefaultEvent | None:
169176
"user_os_detail": get_detailed_platform_str(),
170177
"reflex_version": get_reflex_version(),
171178
"python_version": get_python_version(),
179+
"node_version": (
180+
str(node_version) if (node_version := get_node_version()) else None
181+
),
182+
"bun_version": (
183+
str(bun_version) if (bun_version := get_bun_version()) else None
184+
),
172185
"cpu_count": get_cpu_count(),
173186
"memory": get_memory(),
174187
"cpu_info": dataclasses.asdict(cpuinfo) if cpuinfo else {},

0 commit comments

Comments
 (0)