• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

supabase / supabase / 28430622102
77%

Build:
DEFAULT BRANCH: master
Ran 30 Jun 2026 08:26AM UTC
Jobs 1
Files 102
Run time 1min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

30 Jun 2026 08:22AM UTC coverage: 72.942%. Remained the same
28430622102

push

github

web-flow
fix(logs): map metadata.function_id override to otel attribute key (#47434)

## Problem

Individual edge function logs are broken on the OTEL logs path. The logs
chart for a single function filters by the `metadata.function_id`
override key passed from the function logs page. On the OTEL path this
key has no filter template, so it falls through to the unknown-clause
resolver and is emitted verbatim as
`log_attributes['metadata.function_id']`. OTEL drops the `metadata`
root, so the live attribute key is just `function_id`. The filter
matched nothing and the chart came back empty.

Generated before:

```sql
WHERE source = 'function_logs' AND (log_attributes['metadata.function_id'] = '...')
```

## Fix

Strip a leading `metadata.` prefix in the OTEL unknown-clause resolver
(`resolveUnknownOtelClause`). The same BigQuery-style override key now
resolves to `log_attributes['function_id']`, matching the working
invocations query. This is the documented OTEL convention (the
`metadata` root is always dropped), so it also covers any other
`metadata.*` override keys.

Generated after:

```sql
WHERE source = 'function_logs' AND (log_attributes['function_id'] = '...')
```

## How to test

- Enable the OTEL logs path and open an edge function's Logs tab for a
project with recent invocations.
- Confirm the logs chart renders ok/warning/error buckets instead of an
empty chart.
- Run the unit tests: `pnpm test:studio` (or target
`Logs.utils.otel.test.ts`).
- Expected result: the new test "drops the metadata root from an
override key for function logs" passes, asserting the generated SQL uses
`log_attributes['function_id']`.

<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit

* **Bug Fixes**
* Fixed OTEL filter handling so keys that include the `metadata.` prefix
are translated correctly for log searches.
* Filters like `metadata.function_id` now generate the expected
log-attribute predicates, improving Function logs ma... (continued)

1050 of 1455 branches covered (72.16%)

Branch coverage included in aggregate %.

1573 of 2141 relevant lines covered (73.47%)

248.35 hits per line

Subprojects
ID Flag name Job ID Ran Files Coverage
1 studio-tests 28430622102.1 30 Jun 2026 08:26AM UTC 102
72.94
GitHub Action Run
Source Files on build 28430622102
  • Tree
  • List 102
  • Changed 0
  • Source Changed 0
  • Coverage Changed 0
Coverage ∆ File Lines Relevant Covered Missed Hits/Line Branch Hits Branch Misses
  • Back to Repo
  • Github Actions Build #28430622102
  • 25f1648e on github
  • Prev Build on master (#28427513464)
  • Next Build on master (#28433778765)
  • Delete
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE TRIAL · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc