Skip to content

feat(landing): log parsing guide - #1578

Merged
JeremyFunk merged 6 commits into
mainfrom
feat/guide-log-parsing
Oct 31, 2026
Merged

JeremyFunk merged 6 commits into
mainfrom
feat/guide-log-parsing

feat(landing): rework the log parsing guide around switchable Collect…

92bcc7a
Select commit
Loading
Failed to load commit list.
Maple Review Bot / Maple / review completed Oct 31, 2026 in 1m 46s

Confidence 6/10 · 1 issue to address

🟡 Confidence 6/10 · needs attention. Held at 6 because a correctness warning is open.
1 warning −1 · tests not needed · risk medium · 2 defects fixed in earlier rounds

Adds the /guides/log-parsing page, six raw Collector configs, two screenshots and two highlight languages. The build-time regex guard holds and the configs match their sample lines; one claim about query strings is wrong and should be fixed before merge.

  • log-parsing.astro builds the nginx regex from its colored segments and splits nginx.yaml on it, so a mismatch breaks the build
  • guide-highlight.ts gains an otel-debug language and single-quoted strings in shell
  • Each format ships as its own file under _log-parsing/, with file_log/otlp_http names and a debug.yaml overlay
  • The guide is listed in guides/index.astro and llms.txt.ts

Findings

🟠 Warning · F3 · Guide says the query string is not kept, but the record's Body holds the raw line

correctness · apps/landing/src/pages/guides/log-parsing.astro:462

The figcaption says the query string, protocol and referrer are matched but not kept, and the mistakes list says a query string never reaches an attribute. The nginx config never changes Body, so the raw line survives (see the page's own Body: Str(...) at line 243) and ?expand=items travels to Maple as the message.

Say the fields are dropped from the attributes but stay in the record's body, or add a `set(log.body, ...)`/`move` that replaces the raw line.

Fixed since the last review

  • ✅ F2 · Card says 14 min read, the guide header says 10

Production impact

Production traffic of the changed files (last 7 days)
File Calls/day Busiest operations
apps/landing/src/pages/guides/log-parsing.astro 1.3k GET 816/day, 1.5% err
GET 472/day, 16.5% err
What was checked
  • The regex rebuilt from the page's segments equals the one in _log-parsing/nginx.yaml and matches the sample, 502 and 404 lines but not the TLS line
  • awk -F'"' '{split($3, f, " ")...}' on mawk 1.3.4 prints 200 and 502, as the awk tab claims
  • Both screenshots exist under public/screenshots/guides/ (51 KB, 160 KB), and page and index card both say 9 min

92bcc7a · Reply "won't fix" to dismiss a finding, or mention @maple-review-bot to ask about one.

Annotations

Check warning on line 462 in apps/landing/src/pages/guides/log-parsing.astro

See this annotation in the file changed.

@maple-review-bot maple-review-bot / Maple / review

correctness: Guide says the query string is not kept, but the record's `Body` holds the raw line

The figcaption says the query string, protocol and referrer are matched but not kept, and the mistakes list says a query string never reaches an attribute. The nginx config never changes `Body`, so the raw line survives (see the page's own `Body: Str(...)` at line 243) and `?expand=items` travels to Maple as the message.