Skip to content

Show the short request ID of log lines - #56

Merged
mnapoli merged 2 commits into
mainfrom
request-id
Sep 26, 2026
Merged

mnapoli merged 2 commits into
mainfrom
request-id

Conversation

@mnapoli

@mnapoli mnapoli commented Sep 26, 2026 •

Copy link
Copy Markdown
Member

Bref's log formatters now start each line with the Lambda request ID (brefphp/monolog-bridge 2.0, brefphp/logger 3.0), and Bref Cloud returns it in the request_id field of bref logs records (it already parses the lines, so the message itself has no prefix).

bref logs now shows its first 8 characters after the function, like the dashboard does, instead of the instance:

2026-09-26 16:40:28.667 web          Creating storage directories…
2026-09-26 16:40:33.983 web 092cf7a5 INFO  Starting something slow
2026-09-26 16:40:40.983 web 092cf7a5       The PHP script timed out…

That is enough to tell the requests of a page apart, and to see all the logs of one: bref logs --search=092cf7a5 --all. Lines without a request ID (a cold start, a PHP-FPM error) get a blank column.

A single ID column rather than the instance and the request ID side by side, which read as two unlabeled IDs. Logs without any request ID (applications on older versions of Bref's packages) keep the instance column as before. --json still has both instance and the full request_id.

Rendering only: older CLI versions ignore the new field.

Bref's log formatters start lines with the Lambda request ID, and Bref Cloud returns it as
`request_id`. Show its first 8 characters after the instance, like the dashboard: enough to tell
requests apart, and to find all the logs of one with `--search=<id> --all`.

Claude-Session: https://claude.ai/code/session_0168N55uBK9UjfpL6r8oGjDm
Two unlabeled IDs side by side were confusing. Logs without request IDs (older versions of Bref's
log formatters) keep the instance.

Claude-Session: https://claude.ai/code/session_0168N55uBK9UjfpL6r8oGjDm
@mnapoli
mnapoli merged commit 900c122 into main Sep 26, 2026
4 checks passed
@mnapoli
mnapoli deleted the request-id branch September 26, 2026 20:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant