3 releases

Uses new Rust 2024

0.1.2 Sep 12, 2025
0.1.1 Sep 12, 2025
0.1.0 Sep 12, 2025

#163 in Value formatting

MIT/Apache and LGPL-3.0-or-later

16KB
65 lines

prat

Crates.io Version

A pretty-printer for the prometheus text format

Usage

Pipe to cat/head/etc to disable pretty-printing:

$ curl https://demo.promlabs.com/metrics | prat | head
---
metrics:
  - name: go_gc_cycles_automatic_gc_cycles_total
    help: Count of completed GC cycles generated by the Go runtime. Sourced from /gc/cycles/automatic:gc-cycles.
    type: Counter
    samples:
      - labels: []
        number: 24304.0
  - name: go_gc_cycles_forced_gc_cycles_total
    help: Count of completed GC cycles forced by the application. Sourced from /gc/cycles/forced:gc-cycles.

Installation

cargo install prat

Dependencies

~15–44MB
~659K SLoC