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

ausimian / loki_logger_handler / cbb793dc29cf833b6a849eb9b1fb444de31b6ab6-PR-6
94%
main: 94%

Build:
Build:
LAST BUILD BRANCH: ci/run-precommit
DEFAULT BRANCH: main
Ran 25 May 2026 02:33AM UTC
Jobs 1
Files 11
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

25 May 2026 02:32AM UTC coverage: 93.61% (-0.4%) from 94.02%
cbb793dc29cf833b6a849eb9b1fb444de31b6ab6-PR-6

Pull #6

github

ausimian
fix: prevent a single bad event from removing the handler

A malformed log event could raise inside Formatter.format/3, which runs
inline in Handler.log/2. Erlang's logger removes a handler whose log/2
raises, so one bad event silently disabled Loki logging for the lifetime
of the node.

Wrap the format step in a rescue: on failure the handler buffers a
best-effort fallback entry (level label + inspected message) and emits a
[:loki_logger_handler, :format, :error] telemetry event instead of
letting the exception propagate. Also add catch-all clauses to
format_message/2, the format_report/2 report_cb case, and
extract_timestamp/1 so unexpected-but-recoverable shapes degrade
gracefully rather than raising.

Closes #2
Pull Request #6: fix: prevent a single bad event from removing the handler

11 of 13 new or added lines in 2 files covered. (84.62%)

293 of 313 relevant lines covered (93.61%)

29.34 hits per line

Uncovered Changes

Lines Coverage ∆ File
2
93.48
-3.82% lib/loki_logger_handler/handler.ex
Jobs
ID Job ID Ran Files Coverage
1 cbb793dc29cf833b6a849eb9b1fb444de31b6ab6-PR-6.1 25 May 2026 02:33AM UTC 11
93.61
GitHub Action Run
Source Files on build cbb793dc29cf833b6a849eb9b1fb444de31b6ab6-PR-6
  • Tree
  • List 11
  • Changed 3
  • Source Changed 0
  • Coverage Changed 3
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Pull Request #6
  • PR Base - main (#B9F3EBFB...)
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