You are viewing a plain text version of this content. The canonical link for it is here.
Posted to pr@flagon.apache.org by "brucearctor (via GitHub)" <gi...@apache.org> on 2026/10/12 00:33:03 UTC
[PR] feat(distill,userale): add frustration, spatial, and OTel analytics and fix edge-case bugs (flagon)
brucearctor opened a new pull request, #192:
URL: https://github.com/apache/flagon/pull/192
## Summary
Expands Apache Flagon Distill with behavioral, spatial, and OpenTelemetry analytics aligned with UserALE 2.5 telemetry, adds Python 3.12/3.13 `uv` CI testing alongside the existing Poetry matrix, and resolves correctness bugs discovered during a deep audit of UserALE and Distill.
### 1. UserALE (`flagon-userale`) Correctness & Integration Fixes
- **`input` event details**: Wired `extractInputDetails` to `input` events in `defineDetails` / `defineCustomDetails` instead of `extractKeyboardDetails` (which returned `undefined` key fields on `InputEvent`).
- **Discrete interaction bounding-box geometry (`targetRect`)**: Attached `targetRect` (`{ x, y, width, height }`) to discrete raw interaction events (`click`, `dblclick`, `change`, `submit`) and mapped it in `OtlpJsonExporter` (`flagon.target_rect`) and `ProtoJsonExporter` (`customFields`).
- **Session Replay & Exporters**:
- Preserved non-`custom` `logType` (`mutation`, `replay`) in `ProtoJsonExporter`.
- Wired `unhandledrejection` error trigger alongside `error` in `startSessionReplay`.
- Made `> 48 KB` replay envelope flushes respect custom `config.exporter` and `config.otlpEndpoint`.
- Guarded `setup()` / `start()` against overwriting an active `rrweb` ring buffer and supported dynamic `observeMutations` toggling via `options()`.
### 2. Distill (`flagon-distill`) Bug Fixes & New Behavioral Analytics
- **Bug fixes**:
- `getUUID`: Support modern camelCase `sessionId` and interval logs (`startTime`/`endTime`).
- `stats.setup` & `click_rate`: Prevent overwriting multiple logs occurring on the same millisecond and guard against zero-duration division errors.
- `Session`, `Sessions`, `Segments`, `generate_segments`: Fix mutable default arguments, empty `Session()` initialization, `chunk_by_tabId`/`group_by_user` dict/list handling and `sessionId` fallbacks, and `None` field handling in `generate_segments`.
- `createDiGraph` & `funnel`: Avoid mutating caller's `edges` list in-place and guard against empty/unreached funnel targets.
- **New Analytics Modules**:
- `distill.analytics.frustration`: `detect_rage_clicks`, `detect_dead_clicks`, `detect_dom_thrash`, `frustration_score`
- `distill.analytics.spatial`: `click_heatmap_data`, `plot_click_heatmap`, `scroll_depth_summary`
- `distill.analytics.otel`: `correlate_by_trace`, `extract_replay_envelopes`
- `distill.analytics.graph.transition_matrix` & `distill.analytics.stat.session_summary`
- **CI & Tooling**:
- Added `test_uv` target in `products/distill/Makefile` and `test-uv` job in `.github/workflows/distill_ci.yml` testing Python `3.12` and `3.13` with `uv` alongside the existing Python `3.8`–`3.11` Poetry test matrix.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: pr-unsubscribe@flagon.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: pr-unsubscribe@flagon.apache.org
For additional commands, e-mail: pr-help@flagon.apache.org
Re: [PR] feat(distill,userale): add frustration, spatial, and OTel analytics and fix edge-case bugs (flagon)
Posted by "brucearctor (via GitHub)" <gi...@apache.org>.
brucearctor merged PR #192:
URL: https://github.com/apache/flagon/pull/192
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: pr-unsubscribe@flagon.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: pr-unsubscribe@flagon.apache.org
For additional commands, e-mail: pr-help@flagon.apache.org