Skip to content

feat: define where a beacon event lives in the log table - #102

Merged
hughgrigg merged 1 commit into
mainfrom
claude/beacon-event-schema-100
Aug 29, 2026
Merged

feat: define where a beacon event lives in the log table#102
hughgrigg merged 1 commit into
mainfrom
claude/beacon-event-schema-100

Conversation

@hughgrigg

Copy link
Copy Markdown
Contributor

The beacon sends a GET to a path on the site's own domain and puts its payload in the query string, so its rows arrive in the CloudFront access log like any other request. They carry different information all the same, and nothing said where that definition lives. It stays in cs_uri_query, read at query time. A column of its own was never available, because LogTable builds its columns from the fields the delivery was configured with and CloudFront has no field carrying somebody else's payload, and a view or a second table over the same objects meets the same wall since no SerDe parses a query string. searches already reads a search term out of the same column this way. src/beacon-events.ts holds the envelope both halves read: three parameters, one letter each, built in the browser with beaconQueryString and read back as SQL with beaconEventColumn and friends, so one definition covers both directions. Partitions written before the beacon shipped answer no rows rather than nulls, because a beacon row is identified by the path it was sent to, which is the one shape of schema change an immutable store takes without argument. What each event type carries beside the envelope is left to the beacon's own issue, and beaconSchemaVersion rides on every row so that arriving later costs no reinterpretation of rows already written.

Resolves #100

  • Conventional commit message, used as the title

  • Conventional branch name, like feat/concise-description

  • Full check with pnpm run check passed

  • Rebased off latest main

  • User-facing behaviour is documented in docs/

The beacon sends a GET to a path on the site's own domain and puts its payload
in the query string, so its rows arrive in the CloudFront access log like any
other request. They carry different information all the same, and nothing said
where that definition lives.

It stays in `cs_uri_query`, read at query time. A column of its own was never
available: `LogTable` builds its columns from the fields the delivery was
configured with, and CloudFront has no field carrying somebody else's payload.
A view or a second table over the same objects meets the same wall, because no
SerDe parses a query string. `searches` already reads a search term out of the
same column this way.

`src/beacon-events.ts` holds the envelope both halves read. Three parameters,
one letter each, since the whole query string is written into every row and
scanned by every query touching the column. The browser builds it with
`beaconQueryString` and a rollup reads it back with `beaconEventColumn` and
friends, so one definition covers both directions.

Partitions written before the beacon shipped answer no rows rather than nulls,
because a beacon row is identified by the path it was sent to. That is the one
shape of schema change an immutable store takes without argument.

What each event type carries beside the envelope is left to the beacon's own
issue. `beaconSchemaVersion` rides on every row so that arriving later costs no
reinterpretation of rows already written.

Closes #100
@coderabbitai

coderabbitai Bot commented Aug 29, 2026

Copy link
Copy Markdown

Warning

Review limit reached

Next included review available in 42 minutes.

View limit details

Limit details: You’ve used the included review currently available. Your 90 included PR review attempts over the past 7 days set your current allowance at 1 review per hour.

Your organization has reached its usage spending cap. Adjust your spending cap in the billing tab.

Learn how review limits work.

Review configuration:

⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: d3a32d0c-fefe-4668-8f52-b17be70871b6

📥 Commits

Reviewing files that changed from the base of the PR and between 5b66eb5 and b14c80d.

📒 Files selected for processing (5)
  • docs/log-table/README.md
  • src/beacon-events.test.ts
  • src/beacon-events.ts
  • src/cdk/log-table.test.ts
  • src/index.ts

Comment @coderabbitai help to get the list of available commands.

@hughgrigg
hughgrigg merged commit 7669f45 into main Aug 29, 2026
8 checks passed
@hughgrigg
hughgrigg deleted the claude/beacon-event-schema-100 branch August 29, 2026 12:13
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.

Fit the beacon's rows into the Glue table the CloudFront logs use

1 participant