Skip to content

Commit 1e35c66

Browse files
CopilotJen-Uno
andcommitted
docs: fix review issues and add Hot Reload telemetry
- Fixed SHA256 hash examples in Telemetry-GlobalProperties.md (64 hex chars) - Fixed inconsistent error property casing in Telemetry-Licensing.md (lowercase) - Clarified App MCP tool descriptions (element peer default action vs specific actions) - Updated Privacy.md and GlobalProperties.md to accurately reflect stack trace collection - Added clarification that DevServer and Licensing diagnostic events include raw ErrorMessage/StackTrace - Added 11 Hot Reload processor events to Telemetry-DevServer.md (notify-start through notify-error) - Documented Hot Reload properties with hotreload/ prefix notation - Added Hot Reload property value examples - Expanded DevServer from 146 to 184 lines with comprehensive Hot Reload telemetry Addresses review comments #2691759375, #2691759390, #2691759406, #2691759413, #2691759422, #2691759433 Related to unoplatform/private#998 Co-authored-by: Jen-Uno <214558326+Jen-Uno@users.noreply.github.com>
1 parent b79110f commit 1e35c66

File tree

5 files changed

+47
-9
lines changed

5 files changed

+47
-9
lines changed

doc/internal-documentation/Telemetry-DevServer.md

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,36 @@ App launches are tracked via the `AppLaunchMessage` with the following propertie
7373
| `app-launch/connected` | `TargetPlatform` (string), `IsDebug` (string), `IDE` (string), `PluginVersion` (string), `WasTimedOut` (string), `WasIdeInitiated` (string) | `LatencyMs` (double) | Global | App connected to DevServer |
7474
| `app-launch/connection-timeout` | `TargetPlatform` (string), `IsDebug` (string), `IDE` (string), `PluginVersion` (string) | `TimeoutSeconds` (double) | Global | App connection timed out |
7575

76+
## Hot Reload Events
77+
78+
**Event Name Prefix:** `uno/dev-server/hot-reload`
79+
80+
Hot Reload processor events track the state transitions and operations of the Hot Reload system:
81+
82+
| Event Name | Properties | Measurements | Description |
83+
|------------|-----------|--------------|-------------|
84+
| `notify-start` | `Event` (string), `Source` (string), `PreviousState` (string) | `FileCount` (double), `DurationMs` (double, optional) | Hot Reload notification started |
85+
| `notify-disabled` | `Event` (string), `Source` (string), `PreviousState` (string) | `FileCount` (double), `DurationMs` (double, optional) | Hot Reload is disabled |
86+
| `notify-initializing` | `Event` (string), `Source` (string), `PreviousState` (string) | `FileCount` (double), `DurationMs` (double, optional) | Hot Reload is initializing |
87+
| `notify-ready` | `Event` (string), `Source` (string), `PreviousState` (string) | `FileCount` (double), `DurationMs` (double, optional) | Hot Reload is ready |
88+
| `notify-processing-files` | `Event` (string), `Source` (string), `PreviousState` (string) | `FileCount` (double), `DurationMs` (double, optional) | Hot Reload is processing files |
89+
| `notify-completed` | `Event` (string), `Source` (string), `PreviousState` (string) | `FileCount` (double), `DurationMs` (double, optional) | Hot Reload operation completed |
90+
| `notify-no-changes` | `Event` (string), `Source` (string), `PreviousState` (string) | `FileCount` (double), `DurationMs` (double, optional) | No changes detected |
91+
| `notify-failed` | `Event` (string), `Source` (string), `PreviousState` (string) | `FileCount` (double), `DurationMs` (double, optional) | Hot Reload operation failed |
92+
| `notify-rude-edit` | `Event` (string), `Source` (string), `PreviousState` (string) | `FileCount` (double), `DurationMs` (double, optional) | Rude edit detected (requires restart) |
93+
| `notify-complete` | `Event` (string), `Source` (string), `PreviousState` (string), `NewState` (string), `HasCurrentOperation` (bool) | `FileCount` (double), `DurationMs` (double, optional) | Hot Reload state transition complete |
94+
| `notify-error` | `Event` (string), `Source` (string), `PreviousState` (string), `NewState` (string), `HasCurrentOperation` (bool), `ErrorMessage` (string), `ErrorType` (string) | `FileCount` (double), `DurationMs` (double, optional) | Hot Reload error occurred |
95+
96+
**Property Notes:**
97+
- All properties are prefixed with `hotreload/` in the actual telemetry
98+
- All measurements are prefixed with `hotreload/` in the actual telemetry
99+
- **Event**: Type of event that triggered the notification
100+
- **Source**: Source of the event (IDE, DevServer, etc.)
101+
- **PreviousState/NewState**: State before/after the operation (Ready, Disabled, Initializing, Processing)
102+
- **HasCurrentOperation**: Indicates if a Hot Reload operation is in progress
103+
- **FileCount**: Number of files affected (only present if there is a current operation)
104+
- **DurationMs**: Duration of the operation in milliseconds (only present if operation has completed)
105+
76106
### Legacy App Launch Properties
77107

78108
| Property | Type | Description |
@@ -134,6 +164,14 @@ Example values for Dev Server telemetry properties:
134164
- **Plugin**: "Uno.VSCode.Extension v1.2.3", "Uno.Rider.Plugin v2.0.1", "Uno.VisualStudio.Extension v1.5.0"
135165
- **Step**: "Launched", "Connected"
136166

167+
### Hot Reload Properties
168+
- **Event** (Hot Reload): "ProcessingFiles", "Completed", "NoChanges", "Failed", "RudeEdit"
169+
- **Source** (Hot Reload): "IDE", "DevServer", "FileWatcher"
170+
- **PreviousState** / **NewState**: "Ready", "Disabled", "Initializing", "Processing"
171+
- **HasCurrentOperation**: `true`, `false`
172+
- **ErrorMessage** (Hot Reload): "Compilation failed", "Syntax error in file", "Type not found"
173+
- **ErrorType** (Hot Reload): "CompilationException", "SyntaxException", "TypeLoadException"
174+
137175
## Privacy Notes
138176

139177
- **ErrorMessage** and **StackTrace** properties are sent as raw values and may contain sensitive information; handle with care

doc/internal-documentation/Telemetry-GlobalProperties.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ All global properties follow these privacy principles:
100100
- **MAC Address**: Hashed with SHA256 to create stable, anonymous machine ID
101101
- **Working Directory**: Hashed with SHA256 to avoid exposing file paths
102102
- **User Tokens**: Hashed with SHA256 when used as user identifiers
103-
- **Stack Traces**: Only exception types are logged, not full stack traces
103+
- **Stack Traces**: For most telemetry, only exception types are logged, not full stack traces. However, certain diagnostic events (DevServer startup-failure, Licensing manager-failed) may include raw stack traces for troubleshooting purposes.
104104

105105
### What is NOT Collected
106106

@@ -190,8 +190,8 @@ Example values for common global properties:
190190

191191
### Application Information Examples
192192
- **SessionId**: "3fa85f64-5717-4562-b3fc-2c963f66afa6" (GUID format)
193-
- **UserId**: "a7b8c9d0e1f2g3h4i5j6k7l8m9n0o1p2" (SHA256 hash, 64 hex characters)
194-
- **MachineId**: "1a2b3c4d5e6f7g8h9i0j1k2l3m4n5o6p" (SHA256 hash, 64 hex characters)
193+
- **UserId**: "a7b8c9d0e1f2a3b4c5d6e7f8a9b0c1d2e3f4a5b6c7d8e9f0a1b2c3d4e5f6a7b8" (SHA256 hash, 64 hex characters)
194+
- **MachineId**: "1a2b3c4d5e6f7a8b9c0d1e2f3a4b5c6d7e8f9a0b1c2d3e4f5a6b7c8d9e0f1a2" (SHA256 hash, 64 hex characters)
195195

196196
### Build Information Examples
197197
- **ProjectType**: "app", "library", "test"

doc/internal-documentation/Telemetry-Licensing.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,12 +12,12 @@ Client-side license manager events:
1212
|------------|-----------|--------------|-------------|
1313
| `logout-requested` | - | - | User requested logout |
1414
| `logout-success` | - | - | Logout completed successfully |
15-
| `logout-failure` | `Error` (string) | - | Logout failed |
15+
| `logout-failure` | `error` (string) | - | Logout failed |
1616
| `login-requested` | - | - | User requested login |
1717
| `login-success` | - | - | Login completed successfully |
1818
| `login-failure` | `error` (string), `errorDescription` (string) | - | Login failed |
1919
| `login-canceled` | - | - | User canceled login |
20-
| `login-timeout` | `Error` (string), `ErrorDescription` (string) | - | Login timed out |
20+
| `login-timeout` | `error` (string), `errorDescription` (string) | - | Login timed out |
2121
| `license-status` | `LicenseName` (string), `LicenseStatus` (string), `TrialDaysRemaining` (int), `LicenseExpiryDate` (date) | - | License status checked |
2222
| `manager-started` | `Feature` (string) | - | License manager started for a feature |
2323
| `manager-failed` | `ErrorType` (string), `ErrorStackTrace` (string) | - | License manager failed |

doc/internal-documentation/Telemetry-Privacy.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ Uno Platform telemetry is designed to be GDPR compliant:
1919
- Anonymous user IDs (hashed tokens, hashed MAC addresses)
2020
- Performance measurements (durations, counts)
2121
- Feature usage patterns (which features are used, how often)
22-
- Error types (exception types only, no stack traces)
22+
- Error types (exception types only; stack traces only in specific diagnostic events)
2323
- Operating system and architecture information
2424
- Target frameworks and platforms
2525
- Hashed directory paths (SHA256)
@@ -28,7 +28,7 @@ Uno Platform telemetry is designed to be GDPR compliant:
2828

2929
- **Personal Information**: No usernames, email addresses, or account details
3030
- **User Content**: No file paths, source code, or project-specific information
31-
- **Detailed Errors**: No stack traces or detailed error messages that could contain sensitive data
31+
- **Detailed Errors**: Generally no stack traces or detailed error messages. Exception: DevServer startup failures and Licensing manager failures may include raw ErrorMessage and StackTrace for diagnostic purposes
3232
- **Raw Tokens**: Bearer tokens are never logged; only SHA256 hashes for opaque tokens
3333

3434
## Disabling Telemetry

doc/internal-documentation/Telemetry.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -107,8 +107,8 @@ IDE extensions track extension lifecycle, user interactions, and dev server oper
107107
**Event Name Prefix:** `uno/app-mcp`
108108

109109
App MCP (Model Context Protocol) telemetry tracks agent interactions with running Uno applications:
110-
- **Community License Tools** - 8 tools (runtime info, screenshot, pointer click, key press, type text, visual tree snapshot, element peer action, close)
111-
- **Pro License Tools** - 2 tools (element peer action, element DataContext)
110+
- **Community License Tools** - 8 tools (runtime info, screenshot, pointer click, key press, type text, visual tree snapshot, element peer default action, close)
111+
- **Pro License Tools** - 2 tools (element peer action for specific peer actions, element DataContext)
112112
- **Session Tracking** - Agent type, platform, tools used
113113
- **Error Tracking** - Connection errors, tool execution errors, timeouts
114114
- **Agent Interaction Metrics** - Tool invocation counts, success rates, session durations

0 commit comments

Comments
 (0)