HerokuBrandur LeachAnnouncement
Hutils – Explore your structured log data
Summary
Heroku’s internal components use logfmt to capture production activity, enabling retrospective request analysis, flexible trace queries, historical metrics, and incident investigation. The format can also become an unreadable 51-page wall of text, motivating hutils, a small suite of tools installable through Rubygems for exploring structured log data. Its ltap command extracts message streams from Splunk or Papertrail using a search query, while lviz parses messages into a tree that groups common key/value nodes and reduces duplicate data; the tools are designed to chain together. Additional commands include lcut for selecting fields and lfmt for colorized, whitespace-enhanced formatting, with both also supporting heroku logs --tail.
Context
Heroku’s logfmt output is valuable for analyzing requests, querying traces, generating historical metrics, fixing bugs, investigating production incidents, and assessing usage, but it can become difficult for humans to read and visualize.
Approach / What changed
Hutils provides chainable command-line tools: ltap extracts log streams from Splunk or Papertrail, lviz builds a tree of shared key/value nodes, lcut selects fields, and lfmt formats logfmt with colors, whitespace, and highlights. The suite is installable via Rubygems.
Takeaways
A standard build API fulfillment logfmt trace described in the post spans 51 pages, illustrating the format’s readability problem.
lviz groups the largest possible sets of common key/value nodes among descendant messages, pruning duplicate data in its terminal tree output.
ltap, lcut, and lfmt support workflows involving Splunk, Papertrail, and heroku logs --tail, and hutils tools can be chained together.
Source and freshness
- Source
- heroku.com
- Published
- Added to Yomu
Summaries are generated from the original by a language model. Check the original before relying on it.
Keep reading
Related reading
The Good Stuff
Paid picks we use ourselves. Links carry a referral code — a subscription through one earns us a commission at no extra cost to you.
The best engineering reads, once a week
One useful email. Unsubscribe anytime.