Commit e4c2050
committed
refactor(eventreporter): use x_linglong() for linglong detection and improve error reporting
重构事件上报模块:将玲珑包判断从 appId 前缀匹配改为由调用方传入 x_linglong() 结果,
内化包信息查询逻辑,新增 app_package_type 字段上报,优化错误信息并添加命令失败日志。
Rework the event reporting logic in removeInstance to use richer systemd unit
exit info (result, execMainCode, execMainStatus, timestamps) via UnitExitInfo,
replacing the previous simple string-based result matching. Split the ambiguous
exit results into launch-failed vs abnormal-exit using systemd result semantics
and a 3-second duration heuristic. Remove the premature reportAppLaunchFailed
call from the app-launch-helper exit code check in Launch(), since invalid
desktop files would produce noisy data at that stage.
- Replace appId.startsWith("org.") with caller-provided x_linglong() for linglong detection
- Internalize package info query (version + pakType) into queryAppPackageInfo()
- Add app_package_type field to all event reports
- Collect full UnitExitInfo (result, execMainCode, execMainStatus, timestamps)
via UnitResultWatcher instead of just the result string
- Classify systemd results into launchFailedResults and ambiguousResults,
use 3s duration threshold to distinguish launch failure from abnormal exit
- Remove reportAppLaunchFailed from Launch() app-launch-helper error path
to avoid noise from invalid desktop files
- Remove reportAppLaunchDuration and getAppVersion() API
- Add qCWarning logs for failed dpkg-query/ll-cli commands
- Cache both version and pakType (including empty results) to avoid redundant queries
- Reduce waitForFinished timeout from 3s/5s to 1s
PMS: TASK-3894051 parent ef15406 commit e4c2050
5 files changed
Lines changed: 147 additions & 97 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
15 | 15 | | |
16 | 16 | | |
17 | 17 | | |
| 18 | + | |
18 | 19 | | |
19 | 20 | | |
20 | 21 | | |
21 | 22 | | |
22 | 23 | | |
23 | 24 | | |
| 25 | + | |
24 | 26 | | |
25 | 27 | | |
26 | 28 | | |
| |||
468 | 470 | | |
469 | 471 | | |
470 | 472 | | |
471 | | - | |
472 | | - | |
473 | | - | |
474 | | - | |
475 | | - | |
| 473 | + | |
| 474 | + | |
| 475 | + | |
| 476 | + | |
| 477 | + | |
| 478 | + | |
| 479 | + | |
| 480 | + | |
| 481 | + | |
| 482 | + | |
476 | 483 | | |
477 | 484 | | |
478 | 485 | | |
479 | 486 | | |
480 | 487 | | |
481 | | - | |
| 488 | + | |
| 489 | + | |
| 490 | + | |
| 491 | + | |
| 492 | + | |
| 493 | + | |
| 494 | + | |
| 495 | + | |
| 496 | + | |
| 497 | + | |
| 498 | + | |
| 499 | + | |
| 500 | + | |
| 501 | + | |
| 502 | + | |
| 503 | + | |
| 504 | + | |
| 505 | + | |
| 506 | + | |
482 | 507 | | |
483 | 508 | | |
484 | 509 | | |
| |||
490 | 515 | | |
491 | 516 | | |
492 | 517 | | |
493 | | - | |
| 518 | + | |
494 | 519 | | |
495 | | - | |
496 | | - | |
| 520 | + | |
| 521 | + | |
| 522 | + | |
497 | 523 | | |
498 | 524 | | |
499 | 525 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
26 | 26 | | |
27 | 27 | | |
28 | 28 | | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
29 | 37 | | |
30 | 38 | | |
31 | 39 | | |
| |||
36 | 44 | | |
37 | 45 | | |
38 | 46 | | |
39 | | - | |
40 | | - | |
41 | | - | |
42 | | - | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
43 | 70 | | |
44 | 71 | | |
45 | 72 | | |
46 | 73 | | |
47 | | - | |
| 74 | + | |
48 | 75 | | |
49 | 76 | | |
50 | 77 | | |
| 78 | + | |
51 | 79 | | |
52 | 80 | | |
53 | 81 | | |
| |||
108 | 136 | | |
109 | 137 | | |
110 | 138 | | |
111 | | - | |
| 139 | + | |
112 | 140 | | |
113 | 141 | | |
114 | 142 | | |
| |||
124 | 152 | | |
125 | 153 | | |
126 | 154 | | |
127 | | - | |
| 155 | + | |
128 | 156 | | |
129 | 157 | | |
130 | 158 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
408 | 408 | | |
409 | 409 | | |
410 | 410 | | |
411 | | - | |
412 | 411 | | |
413 | 412 | | |
414 | 413 | | |
| |||
438 | 437 | | |
439 | 438 | | |
440 | 439 | | |
441 | | - | |
442 | 440 | | |
443 | 441 | | |
444 | 442 | | |
| |||
447 | 445 | | |
448 | 446 | | |
449 | 447 | | |
450 | | - | |
451 | 448 | | |
452 | 449 | | |
453 | 450 | | |
| |||
462 | 459 | | |
463 | 460 | | |
464 | 461 | | |
465 | | - | |
466 | | - | |
467 | 462 | | |
468 | 463 | | |
469 | 464 | | |
| |||
499 | 494 | | |
500 | 495 | | |
501 | 496 | | |
502 | | - | |
503 | 497 | | |
504 | 498 | | |
505 | 499 | | |
506 | 500 | | |
507 | 501 | | |
508 | 502 | | |
509 | | - | |
510 | 503 | | |
511 | 504 | | |
512 | 505 | | |
| |||
521 | 514 | | |
522 | 515 | | |
523 | 516 | | |
524 | | - | |
| 517 | + | |
525 | 518 | | |
526 | 519 | | |
527 | 520 | | |
| |||
614 | 607 | | |
615 | 608 | | |
616 | 609 | | |
617 | | - | |
618 | 610 | | |
619 | 611 | | |
620 | 612 | | |
| |||
1123 | 1115 | | |
1124 | 1116 | | |
1125 | 1117 | | |
1126 | | - | |
1127 | | - | |
1128 | 1118 | | |
1129 | 1119 | | |
1130 | 1120 | | |
| |||
0 commit comments