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

Logflare / logflare / 243113b55ef4cacd81d125a7de49c43eead96460
81%

Build:
DEFAULT BRANCH: main
Ran 28 May 2026 08:41PM UTC
Jobs 1
Files 477
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

28 May 2026 08:27PM UTC coverage: 80.483% (-0.02%) from 80.5%
243113b55ef4cacd81d125a7de49c43eead96460

push

github

web-flow
perf: drop dead LogEvent.flattened_body field (#3535)

* perf: drop dead LogEvent.flattened_body field

The ClickHouse pipeline switched from `Mapper.map(event.flattened_body, ..., flat_keys: true)` back to `Mapper.map(event.body, ...)` in #3350, leaving `LogEvent.flattened_body` (and the `MetadataCleaner.flatten/1` chain that fed it) computed on every ingested event but read nowhere in production. At 1–2M events/sec with `batch_size: 50_000`, the duplicated (and often larger) flat-keyed body sat on Broadway processor/batcher heaps and was copied on every inter-process send.

Validation already runs against `body`, not `flattened_body` (`BigQuerySchemaChange.validate/2` does its own nested walk), so dropping the `flatten_body` step at the tail of `LogEvent.make/2` is safe.

- Drop the `flattened_body` field from `LogEvent`, the private `flatten_body/1` helper + pipe call, and the `flattened_body` write in `apply_custom_event_message/2`.
- Delete `MetadataCleaner.flatten/1` and its `do_flatten_*` / `build_key` helpers (and the associated test/property block + flatten bench). `deep_reject_nil_and_empty/1` and `nil_or_empty?/1` stay — `LogEvent.mapper/1` still uses them.
- Remove `LogEvent.flattened_body` mentions from `Mapper` and the Rust NIF docs. The `flat_keys: true` option itself stays — it's still tested directly and remains valid for future flat-keyed inputs.
- Drop the `flattened_body, flat_keys` arm of `mapper_bench.exs`.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

* bench: log_event_make snapshots around flattened_body removal

Pre-change baseline at 7b2d6c250 (main) and post-change at 97f9f1104 (this branch). Deltas on Apple M5:

- edge log payloads (~80 leaves, 4–5 levels): memory −32% to −41%, reductions −20% to −28%, wall −4% to −9%, throughput +4% to +13%.
- OTel trace payloads (~15 leaves, 2–3 levels): memory −19% to −25%, reductions −13% to −20%, wall −3% to −4%, throughput +2% to +4%.

Memory savings dominate... (continued)

12693 of 15771 relevant lines covered (80.48%)

3535.64 hits per line

Jobs
ID Job ID Ran Files Coverage
1 243113b55ef4cacd81d125a7de49c43eead96460.1 28 May 2026 08:41PM UTC 477
80.48
GitHub Action Run
Source Files on build 243113b55ef4cacd81d125a7de49c43eead96460
  • Tree
  • List 477
  • Changed 3
  • Source Changed 0
  • Coverage Changed 3
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • 243113b5 on github
  • Prev Build on main (#7B2D6C25...)
  • Next Build on main (#75FAB531...)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc