#metrics-exporter #metrics #exporter #log #logging #log-level #metrics-core

metrics-exporter-log

A metrics-core compatible exporter for forwarding metrics to logs

5 releases (3 breaking)

0.4.0 Jan 22, 2020
0.3.0 Jul 30, 2019
0.2.1 Jun 11, 2019
0.2.0 May 1, 2019
0.1.0 Apr 24, 2019

#31 in #metrics-exporter

Download history 273/week @ 2024-03-13 1071/week @ 2024-03-20 423/week @ 2024-03-27 325/week @ 2024-04-03 826/week @ 2024-04-10 313/week @ 2024-04-17 423/week @ 2024-04-24 319/week @ 2024-05-01 215/week @ 2024-05-08 129/week @ 2024-05-15 179/week @ 2024-05-22 411/week @ 2024-05-29 419/week @ 2024-06-05 296/week @ 2024-06-12 499/week @ 2024-06-19 393/week @ 2024-06-26

1,664 downloads per month
Used in 2 crates

MIT license

19KB
238 lines

metrics-exporter-log

conduct-badge downloads-badge release-badge docs-badge license-badge

metrics-exporter-log is a metrics-core compatible exporter for forwarding metrics to logs.

code of conduct

NOTE: All conversations and contributions to this project shall adhere to the Code of Conduct.


lib.rs:

Exports metrics via the log crate.

This exporter can utilize observers that are able to be converted to a textual representation via Drain<String>. It will emit that output by logging via the log crate at the specified level.

Run Modes

  • Using run will block the current thread, capturing a snapshot and logging it based on the configured interval.
  • Using async_run will return a future that can be awaited on, mimicing the behavior of run.

Dependencies

~3.5MB
~51K SLoC