#metrics #exporter #log #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

#14 in #exporter

Download history 2200/week @ 2021-10-07 2120/week @ 2021-10-14 2472/week @ 2021-10-21 1616/week @ 2021-10-28 2047/week @ 2021-11-04 2028/week @ 2021-11-11 2521/week @ 2021-11-18 2045/week @ 2021-11-25 2282/week @ 2021-12-02 2125/week @ 2021-12-09 2138/week @ 2021-12-16 2713/week @ 2021-12-23 1754/week @ 2021-12-30 2037/week @ 2022-01-06 2054/week @ 2022-01-13 2232/week @ 2022-01-20

8,634 downloads per month
Used in 2 crates

MIT license

18KB
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

~2.5MB
~36K SLoC