#metrics #statistics #system #recording #running

tacho

A prometheus-focused metrics library for Future-aware applications

8 unstable releases (3 breaking)

Uses old Rust 2015

0.4.2 Jun 26, 2017
0.4.1 Jun 19, 2017
0.3.1 May 4, 2017
0.3.0 Apr 19, 2017
0.1.1 Mar 24, 2017

25 downloads per month

Apache-2.0

35KB
936 lines

Tacho

A Prometheus-focused metrics library for Future-aware Rust applications.

  • Inspired by finagle-stats.
  • Supports Prometheus-style labels and formatting.
  • Supports scoped.
  • Future-aware timing histograms.
  • Thread-safe.

License

Copyright 2017, Buoyant Inc. All rights reserved.

Licensed under the Apache License, Version 2.0 (the "License"); you may not use these files except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.


lib.rs:

A thread-safe, Future-aware metrics library.

Many programs need to information about runtime performance: the number of requests served, a distribution of request latency, the number of failures, the number of loop iterations, etc. tacho::new creates a shareable, scopable metrics registry and a Reporter. The Scope supports the creation of Counter, Gauge, and Stat handles that may be used to report values. Each of these receivers maintains a weak reference back to the central stats registry.

Performance

Labels are stored in a BTreeMap because they are used as hash keys and, therefore, need to implement Hash.

Dependencies

~1MB
~14K SLoC