vaadin / vaadin/observability-kit
Retain interactions and queries per UI in development mode
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 7
- Forks
- 5
- Avg merge
- 2d 16h
- Merged PRs (30d)
- 25
Description
The insight collectors keep an interaction only when it fails or exceeds the 1 s UX budget, and JDBC statements are never kept as records: the row-counting data source feeds a timer, a summary and a span, nothing else. A healthy 300 ms click that ran 30 queries lands in the timers and is gone. That is exactly the case a developer wants to see while working on a view.
In development mode only:
- Keep every interaction in a per-UI ring buffer with a stable interaction id. The collector threshold is already a constructor parameter, so this is a second collector instance with threshold 0, not a redesign.
- Attach data-provider queries and JDBC statements as children of the current interaction, with parameterised SQL, row count, duration and start offset. The data source wrapper already sees the SQL and the row count at result-set close; it needs a second sink next to the span. Statement capture defaults to on here, since the SQL never leaves the developer's machine.
- Count identical statements per interaction. Grouping on the parameterised SQL alone is enough to surface N+1 patterns.
- Expose the UI state sample for one UI on demand.
UiStateSampleralready measures a single UI; only fleet aggregates are published today. - Evict the buffer when the UI detaches, and cap it per UI.
- Add a dev-tools command that returns the buffer for the calling session and UI only. The session is available inside a dev-tools handler, and records already carry session and UI ids.
Nothing here is created in production mode.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by tracing the insight collectors and their constructor threshold, then inspect the row-counting data source, UiStateSampler, and the dev-tools handler. Verify how session and UI IDs flow through these entry points before defining the per-UI buffer boundaries. Done means development-only interaction retention, grouped query and statement records, on-demand UI sampling, detach eviction and per-UI caps, with session/UI-scoped retrieval.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- devtools, observability
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100