Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/bsm/instruments
Collecting metrics over discrete time intervals
https://github.com/bsm/instruments
go golang histogram instrumentation
Last synced: 15 days ago
JSON representation
Collecting metrics over discrete time intervals
- Host: GitHub
- URL: https://github.com/bsm/instruments
- Owner: bsm
- License: mit
- Created: 2016-02-25T07:07:20.000Z (almost 9 years ago)
- Default Branch: main
- Last Pushed: 2022-06-06T10:00:59.000Z (over 2 years ago)
- Last Synced: 2024-12-17T03:03:01.972Z (23 days ago)
- Topics: go, golang, histogram, instrumentation
- Language: Go
- Homepage: https://godoc.org/github.com/bsm/instruments
- Size: 113 KB
- Stars: 0
- Watchers: 3
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Instruments
[![Build Status](https://travis-ci.org/bsm/instruments.svg)](https://travis-ci.org/bsm/instruments) [![GoDoc](https://godoc.org/github.com/bsm/instruments?status.svg)](https://godoc.org/github.com/bsm/instruments)
Instruments allows you to collects metrics over discrete time intervals.
This a fork of the (original library)[https://github.com/heroku/instruments] which
comes with several new additions - consider it a v2!Collected metrics will only reflect observations from last time window only,
rather than including observations from prior windows, contrary to EWMA based metrics.The new features include:
* Slighly faster
* More convenient API
* Support for tags
* Built-in reporters
* Accurate histograms## Instruments
Instruments support two types of instruments: Discrete instruments return a single value, and Sample instruments a sorted array of values.
These base instruments are available:
- Counter: a simple counter.
- Rate: tracks the rate of values per seconds.
- Reservoir: randomly samples values.
- Derive: tracks the rate of values based on the delta with previous value.
- Gauge: tracks last value.
- Timer: tracks durations.You can create custom instruments or compose new instruments form the built-in instruments as long as they implements the Sample or Discrete interfaces.
## Documentation
Please see the [API documentation](https://godoc.org/github.com/bsm/instruments) for package and API descriptions and examples.
## See also
* [Instrumentation by Composition](https://engineering.heroku.com/blogs/2014-10-23-instrumentation-by-composition)
* [Go Metrics](https://github.com/rcrowley/go-metrics)
* [Interval metrics](https://github.com/aphyr/interval-metrics)