## Problem
Compute log rows are filtered on `log_attributes['source']`, the
deprecated twin of the top-level `subservice` the log writer now
publishes. FUNC-894 deletes the twin from the writer, which would leave
the per-instance log tabs and the Unified Logs `compute` type matching
nothing — silently, since a missing attribute key returns no rows rather
than an error.
## Fix
Read the stream from `log_attributes['subservice']` instead. Both keys
carry the same value on every row today, so this is a same-behaviour
switch that lets the twin be removed.
It stays a `log_attributes` lookup rather than a bare `subservice`
column: the unified logs mapping does not classify these rows, so
`source` is empty on a compute row and every key the backend publishes
lands in the attribute map. A bare `subservice` predicate fails the
whole query with `Field "subservice" does not exist`.
- `COMPUTE_LOG_SUBSERVICES` replaces `WORKER_LOG_SOURCES`; the values
keep their pre-rename `worker_*` spelling, which is still what the
backend publishes
- `STREAM_KEY` in `compute-instance-logs-query.ts` and the Unified Logs
condition used by the log-type, status, method, pathname, metadata and
level expressions both move to the new key
- row fixtures in the three utils test files carry `subservice` instead
of `source`, so they match the wire shape that survives FUNC-894
Supersedes #50219, which targets a `subservice` column and a `source =
'worker_logs'` mapping that do not exist yet; that shape becomes the
follow-up if the mapping ships.
Relates to [FE-4358](https://linear.app/supabase/issue/FE-4358).
## How to test
- Open a compute instance's Invocations, Logs, and Activity tabs — each
shows only its own stream, and message filtering still narrows within
it.
- In Unified Logs, include and then exclude the Compute log type; rows,
counts, and charts move together, and compute rows keep their metadata
while status, method, and pathname stay null.
<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit
- **Bug Fixes**
- Compute logs are now identified and filtered using subservice metadata
in unified logs and compute instance logs.
- Compute log classification and display now handle compute-specific
fields and severity consistently.
- Guest and ingress compute streams now use subservice metadata for more
consistent results across supported log views.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
<img width="1086" height="810" alt="image"
src="https://github.com/user-attachments/assets/8a9f0c64-145e-4475-a3df-67bd815e2200"
/>
Stack 2/4 · previous: #50686 · next: #50688
## Problem
The detail panel only showed an Overview tab for log types that have an
inspection query. Every other type opened straight to Raw JSON. The
panel also had no header saying which log was open.
## Solution
- Adds `LogDetail`, which owns the inspection query, loading and error
states, and the Raw JSON view. Errors now use `AlertError`.
- Adds `LogOverview`, which maps each log type to its overview renderer.
Types without one fall back to the new `LogFields`, a generic tree of
expandable key/value rows built on `LogFieldRow`.
- `ServiceFlowPanel` now shows a header (level dot + event message)
above Overview / Raw JSON tabs for every log.
- Moves `getLogDataForMetadataVisibility` to `ServiceFlowPanel.utils.ts`
and adds `LogLevelDot`.
## Review instructions
1. Select a Realtime (or any other non-inspected) log. The Overview tab
should list its fields, with nested objects that expand.
2. Select a Postgres log. The overview should look as before, and Raw
JSON should still show the enriched log.
3. Switch between logs and confirm the tabs reset their scroll.
## Checklist
- [ ] I have read
[CONTRIBUTING.md](https://github.com/supabase/supabase/blob/master/CONTRIBUTING.md)
<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit
- **New Features**
- Added structured log overviews for Postgres, PostgREST, Auth, Storage,
and Edge Functions, with a Raw JSON view for log details.
- Added expandable log fields with filtering and copy actions, plus
visual indicators for log severity.
- **Bug Fixes**
- Improved display of scalar, nested, date, and empty log values.
- **Privacy**
- Raw log data respects metadata visibility settings.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
Co-authored-by: Claude Opus 5 <noreply@anthropic.com>
## Problem
Unified Logs does not expose Workers logs, so users cannot search
Workers ingress, runtime, or build events alongside other services.
## Fix
Add a Workers log type that classifies all three Workers OTEL streams.
Gate the option and any persisted Workers filters with the existing
Workers feature flag.
## How to test
- Enable the Workers feature flag and open Unified Logs.
- Select Workers from the Log Type filter.
- Expected result: Unified Logs shows ingress, runtime, and build events
with the Workers icon.
- Disable the Workers feature flag and load a URL containing
`log_type:eq:workers`.
- Expected result: the Workers option and filter are removed, and
Workers logs are not queried.
- Run `./node_modules/.bin/vitest --run
components/interfaces/UnifiedLogs/UnifiedLogs.queries.test.ts
components/interfaces/UnifiedLogs/UnifiedLogs.utils.test.ts
data/workers/worker-logs-query.test.ts` from `apps/studio`.
<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit
* **New Features**
* Added Workers as a selectable log type in Unified Logs.
* Unified Logs now combines worker ingress, guest, and API streams under
the Workers category.
* Added a dedicated Workers icon and worker log filtering.
* **Improvements**
* Worker filters and URL parameters respect feature availability.
* Worker details show relevant metadata while omitting unavailable HTTP
fields.
* Improved handling of worker log levels, statuses, and raw data.
* Added stronger validation for unified log data.
* **Tests**
* Added coverage for worker routing, filtering, feature visibility,
parsing, and metadata redaction.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->