feat(web-ng): add logs tab to device details page #1073

Open
opened 2026-03-28 04:31:24 +00:00 by mfreeman451 · 1 comment
Owner

Imported from GitHub.

Original GitHub issue: #2942
Original author: @mfreeman451
Original URL: https://github.com/carverauto/serviceradar/issues/2942
Original created: 2026-02-28T04:15:20Z


Is your feature request related to a problem?

Please state a clear and concise description of what the problem is. Ex. I'm always frustrated when [...]

Describe the solution you'd like

A clear and concise description of what you want to happen.

Describe alternatives you've considered

A clear and concise description of any alternative solutions or features you've considered.

Additional context

Add any other context or screenshots about the feature request here.

Imported from GitHub. Original GitHub issue: #2942 Original author: @mfreeman451 Original URL: https://github.com/carverauto/serviceradar/issues/2942 Original created: 2026-02-28T04:15:20Z --- **Is your feature request related to a problem?** Please state a clear and concise description of what the problem is. Ex. I'm always frustrated when [...] **Describe the solution you'd like** A clear and concise description of what you want to happen. **Describe alternatives you've considered** A clear and concise description of any alternative solutions or features you've considered. **Additional context** Add any other context or screenshots about the feature request here.
Author
Owner

Imported GitHub comment.

Original author: @mfreeman451
Original URL: https://github.com/carverauto/serviceradar/issues/2942#issuecomment-3978656276
Original created: 2026-02-28T23:54:35Z


Investigation Findings

After exploring the codebase to implement this feature, we found a blocking issue: there is no way to associate logs with devices.

Problem

The logs table (TimescaleDB hypertable) has these columns:

  • timestamp, observed_timestamp, id (UUID)
  • trace_id, span_id, trace_flags
  • severity_text, severity_number
  • body, event_name
  • source, service_name, service_version, service_instance
  • scope_name, scope_version, scope_attributes
  • attributes, resource_attributes

It does not have device_id, uid, gateway_id, or agent_id columns. There is no foreign key or direct relationship between logs and devices.

The SRQL catalog lists uid, gateway_id, agent_id as filter fields for the logs entity, but the Rust query builder (rust/srql/src/query/logs.rs) does not handle these fields — queries using them would return errors.

What's needed before this can be implemented

One of:

  1. Add a device_uid (or gateway_id + agent_id) column to the logs table so logs can be directly associated with a device
  2. Use resource_attributes JSONB to store device identity and filter on it (would require JSONB filter support in the logs query builder)
  3. Join through an intermediate table that maps source/service_name to device UIDs

Until there's a reliable way to link logs to devices, we can't build a meaningful logs tab on the device details page.

Imported GitHub comment. Original author: @mfreeman451 Original URL: https://github.com/carverauto/serviceradar/issues/2942#issuecomment-3978656276 Original created: 2026-02-28T23:54:35Z --- ## Investigation Findings After exploring the codebase to implement this feature, we found a **blocking issue**: there is no way to associate logs with devices. ### Problem The `logs` table (TimescaleDB hypertable) has these columns: - `timestamp`, `observed_timestamp`, `id` (UUID) - `trace_id`, `span_id`, `trace_flags` - `severity_text`, `severity_number` - `body`, `event_name` - `source`, `service_name`, `service_version`, `service_instance` - `scope_name`, `scope_version`, `scope_attributes` - `attributes`, `resource_attributes` It does **not** have `device_id`, `uid`, `gateway_id`, or `agent_id` columns. There is no foreign key or direct relationship between logs and devices. The SRQL catalog lists `uid`, `gateway_id`, `agent_id` as filter fields for the `logs` entity, but the Rust query builder (`rust/srql/src/query/logs.rs`) does not handle these fields — queries using them would return errors. ### What's needed before this can be implemented One of: 1. **Add a `device_uid` (or `gateway_id` + `agent_id`) column to the logs table** so logs can be directly associated with a device 2. **Use `resource_attributes` JSONB** to store device identity and filter on it (would require JSONB filter support in the logs query builder) 3. **Join through an intermediate table** that maps `source`/`service_name` to device UIDs Until there's a reliable way to link logs to devices, we can't build a meaningful logs tab on the device details page.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
carverauto/serviceradar#1073
No description provided.