Commit fab3ce9
authored
feat: telemetry (#1932)
* feat: telemetry
- Added telemetry support to track document opens for usage-based billing.
- Introduced `initTelemetry` method in the Editor class to initialize telemetry based on configuration.
- Created tests for telemetry functionality, ensuring correct behavior when enabled/disabled and with various configurations.
- Updated Editor and SuperDoc configurations to include telemetry options and license key handling.
- Enhanced SuperConverter to manage document creation timestamps for unique identification.
* refactor: streamline document handling and telemetry logging
- Simplified telemetry logging in the Editor class by removing unnecessary comments and enhancing debug output for document information.
- Removed redundant isNewFile tracking in SuperDoc, allowing automatic handling based on context.
* feat: enhance telemetry license key handling
- Introduced default community license key in the Editor class for telemetry initialization.
- Updated `initTelemetry` function to use the default license key when none is provided.
- Added tests to verify behavior with default and custom license keys.
- Improved documentation for the community license key usage.
* test: update telemetry test endpoint URL
* feat: enhance document tracking and identifier generation
- Introduced a guard flag to prevent double-tracking of document opens in the Editor class.
- Updated document identifier generation to be asynchronous, ensuring metadata is available before tracking.
- Enhanced SuperConverter to manage document timestamps and unique identifiers more effectively.
- Added new utility methods for generating Word-compatible timestamps and content hashes.
- Improved test coverage for document identifier resolution and timestamp handling in various scenarios.
* refactor: simplify telemetry configuration and improve document tracking
- Renamed `isNewFile` to `isBlankDoc` in SuperConverter for clarity regarding document creation context.
- Updated related comments and documentation to reflect the new naming and functionality.
- Enhanced test cases to align with the refactored telemetry and document handling logic.
* refactor: streamline document tracking and metadata generation
- Ensured document metadata is generated regardless of telemetry settings
* refactor: enhance telemetry integration and license key handling
- Simplified license key management in telemetry initialization.
- Updated tests to reflect changes in license key usage and ensure correct behavior.
- Introduced COMMUNITY_LICENSE_KEY constant for consistent license key usage across modules.
* refactor: update telemetry configuration and constructor parameters
* refactor: enhance telemetry logging and update endpoint
* fix: disable telemetry by default1 parent 99131c2 commit fab3ce9
16 files changed
Lines changed: 1342 additions & 851 deletions
File tree
- packages
- super-editor/src/core
- super-converter
- types
- superdoc/src
- core
- helpers
- dev/components
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
| 191 | + | |
| 192 | + | |
| 193 | + | |
| 194 | + | |
| 195 | + | |
| 196 | + | |
| 197 | + | |
| 198 | + | |
| 199 | + | |
| 200 | + | |
| 201 | + | |
| 202 | + | |
| 203 | + | |
| 204 | + | |
| 205 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
54 | 54 | | |
55 | 55 | | |
56 | 56 | | |
| 57 | + | |
57 | 58 | | |
58 | 59 | | |
59 | 60 | | |
| |||
243 | 244 | | |
244 | 245 | | |
245 | 246 | | |
| 247 | + | |
| 248 | + | |
| 249 | + | |
| 250 | + | |
| 251 | + | |
| 252 | + | |
| 253 | + | |
| 254 | + | |
| 255 | + | |
| 256 | + | |
246 | 257 | | |
247 | 258 | | |
248 | 259 | | |
| |||
327 | 338 | | |
328 | 339 | | |
329 | 340 | | |
| 341 | + | |
| 342 | + | |
| 343 | + | |
| 344 | + | |
| 345 | + | |
| 346 | + | |
330 | 347 | | |
331 | 348 | | |
332 | 349 | | |
| |||
393 | 410 | | |
394 | 411 | | |
395 | 412 | | |
| 413 | + | |
396 | 414 | | |
397 | 415 | | |
398 | 416 | | |
| |||
454 | 472 | | |
455 | 473 | | |
456 | 474 | | |
| 475 | + | |
| 476 | + | |
| 477 | + | |
| 478 | + | |
| 479 | + | |
| 480 | + | |
| 481 | + | |
| 482 | + | |
| 483 | + | |
| 484 | + | |
| 485 | + | |
| 486 | + | |
| 487 | + | |
| 488 | + | |
| 489 | + | |
| 490 | + | |
| 491 | + | |
| 492 | + | |
| 493 | + | |
| 494 | + | |
| 495 | + | |
| 496 | + | |
| 497 | + | |
| 498 | + | |
| 499 | + | |
| 500 | + | |
| 501 | + | |
| 502 | + | |
| 503 | + | |
| 504 | + | |
| 505 | + | |
| 506 | + | |
| 507 | + | |
| 508 | + | |
| 509 | + | |
| 510 | + | |
| 511 | + | |
| 512 | + | |
| 513 | + | |
| 514 | + | |
| 515 | + | |
| 516 | + | |
| 517 | + | |
| 518 | + | |
| 519 | + | |
| 520 | + | |
| 521 | + | |
457 | 522 | | |
458 | 523 | | |
459 | 524 | | |
| |||
992 | 1057 | | |
993 | 1058 | | |
994 | 1059 | | |
| 1060 | + | |
| 1061 | + | |
| 1062 | + | |
995 | 1063 | | |
996 | 1064 | | |
997 | 1065 | | |
| |||
1553 | 1621 | | |
1554 | 1622 | | |
1555 | 1623 | | |
| 1624 | + | |
1556 | 1625 | | |
1557 | 1626 | | |
1558 | 1627 | | |
| |||
2118 | 2187 | | |
2119 | 2188 | | |
2120 | 2189 | | |
2121 | | - | |
| 2190 | + | |
| 2191 | + | |
2122 | 2192 | | |
2123 | 2193 | | |
2124 | 2194 | | |
| |||
2521 | 2591 | | |
2522 | 2592 | | |
2523 | 2593 | | |
| 2594 | + | |
| 2595 | + | |
| 2596 | + | |
| 2597 | + | |
| 2598 | + | |
2524 | 2599 | | |
2525 | 2600 | | |
2526 | 2601 | | |
| |||
2531 | 2606 | | |
2532 | 2607 | | |
2533 | 2608 | | |
| 2609 | + | |
2534 | 2610 | | |
2535 | 2611 | | |
2536 | 2612 | | |
| |||
0 commit comments