Backend gaps: missing data for full UI mock parity #90

Open
opened 2026-03-23 21:56:57 +01:00 by claude · 1 comment
Owner

Summary

The UI has been aligned with the design system mock pages, but several mock features require backend data that doesn't exist yet. This issue tracks the remaining backend gaps needed for full visual parity.


1. Latency percentile breakdown (P50 / P95 / P99)

Mock page: /routes — "Latency Percentiles" stat card shows P50, P95, P99 with deltas
Current: Only P99 is computed via approx_percentile(0.99, ...) in continuous aggregates

Needed:

  • Add P50 and P95 columns to stats_1m_all, stats_1m_route, stats_1m_app continuous aggregates
  • Expose in ExecutionStats response: p50LatencyMs, p95LatencyMs alongside existing p99LatencyMs
  • Include previous-period values for trend deltas

2. Per-route timeseries data

Mock page: /routes — charts show multi-series with per-app legends (e.g., order-service, payment-svc, shipment-svc)
Current: Timeseries endpoint returns a single aggregated series, not broken down by route or app

Needed:

  • New endpoint or parameter: GET /search/stats/timeseries?groupBy=route or groupBy=application
  • Returns multiple named series for stacked area charts and per-route bar charts

3. Active/stopped route counts

Mock page: /routes — "Active Routes" stat card shows 7 of 7 with 0 stopped and a pie chart breakdown
Current: activeCount in stats response is not reliably populated

Needed:

  • Query route catalog or agent registry to determine how many routes are active (have recent executions) vs total registered
  • Return activeRoutes and totalRoutes in stats or catalog response

4. In-flight exchange count

Mock page: /routes — "In-Flight Exchanges" card shows current count with high-water mark
Current: Shows 0 — the value comes from activeCount which is not computed

Needed:

  • Track in-flight (RUNNING status) exchanges either via:
    • Real-time count from OpenSearch/PostgreSQL (WHERE status = 'RUNNING')
    • Or agent-reported inflight count from Camel context MBean (InflightExchanges)
  • High-water mark: track max in-flight over the time window

5. Application log streaming

Mock page: /agents/:appId/:instanceId — "Application Log" section with formatted log entries (timestamp, level, logger, message) and filter tabs (All/Warnings/Errors)
Current: Placeholder "Application log streaming is not yet available"

Needed:

  • Agent-side: capture and stream application logs (e.g., via Logback appender or JMX)
  • Server-side: receive, store (or proxy), and serve log entries via SSE or REST endpoint
  • This is a larger feature — may warrant its own issue/milestone

6. Agent group field rename to application

Context: The execution data layer was renamed from groupNameapplicationName (DB columns, Java fields, API params). However, the agent registry still uses group terminology:

  • AgentInfo.group() — the agent's application name
  • GET /agents response uses group field
  • Sidebar and AgentHealth read a.group

Needed:

  • Rename AgentInfo.group()AgentInfo.applicationName() (or application())
  • Update GET /agents response field from group to applicationName
  • Update frontend references (a.groupa.applicationName)
  • Coordinate with cameleer3-common if the registration payload uses group

Priority

Items 1-4 are data enrichment — moderate effort, high UI impact.
Item 5 is a new feature — high effort, can be deferred.
Item 6 is a terminology cleanup — low effort, should be done for consistency.

## Summary The UI has been aligned with the design system mock pages, but several mock features require backend data that doesn't exist yet. This issue tracks the remaining backend gaps needed for full visual parity. --- ### 1. Latency percentile breakdown (P50 / P95 / P99) **Mock page:** `/routes` — "Latency Percentiles" stat card shows P50, P95, P99 with deltas **Current:** Only P99 is computed via `approx_percentile(0.99, ...)` in continuous aggregates **Needed:** - Add P50 and P95 columns to `stats_1m_all`, `stats_1m_route`, `stats_1m_app` continuous aggregates - Expose in `ExecutionStats` response: `p50LatencyMs`, `p95LatencyMs` alongside existing `p99LatencyMs` - Include previous-period values for trend deltas ### 2. Per-route timeseries data **Mock page:** `/routes` — charts show multi-series with per-app legends (e.g., order-service, payment-svc, shipment-svc) **Current:** Timeseries endpoint returns a single aggregated series, not broken down by route or app **Needed:** - New endpoint or parameter: `GET /search/stats/timeseries?groupBy=route` or `groupBy=application` - Returns multiple named series for stacked area charts and per-route bar charts ### 3. Active/stopped route counts **Mock page:** `/routes` — "Active Routes" stat card shows `7 of 7` with `0 stopped` and a pie chart breakdown **Current:** `activeCount` in stats response is not reliably populated **Needed:** - Query route catalog or agent registry to determine how many routes are active (have recent executions) vs total registered - Return `activeRoutes` and `totalRoutes` in stats or catalog response ### 4. In-flight exchange count **Mock page:** `/routes` — "In-Flight Exchanges" card shows current count with high-water mark **Current:** Shows `0` — the value comes from `activeCount` which is not computed **Needed:** - Track in-flight (RUNNING status) exchanges either via: - Real-time count from OpenSearch/PostgreSQL (`WHERE status = 'RUNNING'`) - Or agent-reported inflight count from Camel context MBean (`InflightExchanges`) - High-water mark: track max in-flight over the time window ### 5. Application log streaming **Mock page:** `/agents/:appId/:instanceId` — "Application Log" section with formatted log entries (timestamp, level, logger, message) and filter tabs (All/Warnings/Errors) **Current:** Placeholder "Application log streaming is not yet available" **Needed:** - Agent-side: capture and stream application logs (e.g., via Logback appender or JMX) - Server-side: receive, store (or proxy), and serve log entries via SSE or REST endpoint - This is a larger feature — may warrant its own issue/milestone ### 6. Agent `group` field rename to `application` **Context:** The execution data layer was renamed from `groupName` → `applicationName` (DB columns, Java fields, API params). However, the agent registry still uses `group` terminology: - `AgentInfo.group()` — the agent's application name - `GET /agents` response uses `group` field - Sidebar and AgentHealth read `a.group` **Needed:** - Rename `AgentInfo.group()` → `AgentInfo.applicationName()` (or `application()`) - Update `GET /agents` response field from `group` to `applicationName` - Update frontend references (`a.group` → `a.applicationName`) - Coordinate with `cameleer3-common` if the registration payload uses `group` --- ### Priority Items 1-4 are data enrichment — moderate effort, high UI impact. Item 5 is a new feature — high effort, can be deferred. Item 6 is a terminology cleanup — low effort, should be done for consistency.
Author
Owner

Status update (2026-04-03):

Completed

  • Item 5 — Log streaming: POST /api/v1/data/logs endpoint + ClickHouse logs table implemented
  • Item 6 — group→application rename: AgentInfo uses applicationId, API responses updated
  • Item 2 (partial) — Per-route timeseries: RouteMetricsController generates per-route sparkline data with configurable buckets

Partially done

  • Item 1 — Latency percentiles: Only P99 computed in ClickHouse stats MVs. P50/P95 approximated in UI from avg (not accurate). Need to add quantileState(0.5) and quantileState(0.95) to MVs.

Still open

  • Item 3 — Active/stopped route counts: Not reliably populated
  • Item 4 — In-flight exchange count: Not implemented
Status update (2026-04-03): ### Completed - [x] **Item 5 — Log streaming**: `POST /api/v1/data/logs` endpoint + ClickHouse `logs` table implemented - [x] **Item 6 — group→application rename**: `AgentInfo` uses `applicationId`, API responses updated - [x] **Item 2 (partial) — Per-route timeseries**: `RouteMetricsController` generates per-route sparkline data with configurable buckets ### Partially done - **Item 1 — Latency percentiles**: Only P99 computed in ClickHouse stats MVs. P50/P95 approximated in UI from avg (not accurate). Need to add `quantileState(0.5)` and `quantileState(0.95)` to MVs. ### Still open - **Item 3 — Active/stopped route counts**: Not reliably populated - **Item 4 — In-flight exchange count**: Not implemented
Sign in to join this conversation.