Description
Package provides simple uniform interface for metrics such as counters,
gauges and histograms. It keeps track of metrics in runtime and can be used for
some basic web service instrumentation in Go, where complex tools such as
Prometheus or InfluxDB are not required.
It is compatible with expvar package, that is also commonly used for monitoring.
metric alternatives and similar packages
Based on the "DevOps Tools" category.
Alternatively, view metric alternatives based on common mentions on social networks and blogs.
-
Moby
Moby Project - a collaborative project for the container ecosystem to assemble container-based systems -
Packer
Packer is a tool for creating identical machine images for multiple platforms from a single source configuration. -
Flynn
[UNMAINTAINED] A next generation open source platform as a service (PaaS) -
webhook
webhook is a lightweight incoming webhook server to run shell commands -
Ddosify
High-performance load testing tool, written in Golang. For distributed and Geo-targeted load testing: Ddosify Cloud - https://ddosify.com 🚀 -
Mizu
API traffic viewer for Kubernetes enabling you to view all API communication between microservices. Think TCPDump and Wireshark re-invented for Kubernetes -
dasel
Select, put and delete data from JSON, TOML, YAML, XML and CSV files with a single tool. Supports conversion between formats and can be used as a Go package. -
StatusOK
Monitor your Website and APIs from your Computer. Get Notified through Slack, E-mail when your server is down or response time is more than expected. -
goxc
a build tool for Go, with a focus on cross-compiling, packaging and deployment -
s3gof3r
Fast, concurrent, streaming access to Amazon S3, including gof3r, a CLI. http://godoc.org/github.com/rlmcpherson/s3gof3r -
uTask
µTask is an automation engine that models and executes business processes declared in yaml. ✏️📋 -
kwatch
:eyes: monitor & detect crashes in your Kubernetes(K8s) cluster instantly -
cassowary
:rocket: Modern cross-platform HTTP load-testing tool written in Go -
jcli
Jenkins CLI allows you to manage your Jenkins in an easy way. Jenkins 命令行客户端 -
Pewpew
Flexible HTTP command line stress tester for websites and web services -
easyssh-proxy
easyssh-proxy provides a simple implementation of some SSH protocol features in Go -
dogo
Monitoring changes in the source file and automatically compile and run (restart).
Static code analysis for 29 languages.
Do you think we are missing an alternative of metric or a related project?
Popular Comparisons
README
metric
Package provides simple uniform interface for metrics such as counters, gauges and histograms. It keeps track of metrics in runtime and can be used for some basic web service instrumentation in Go, where complex tools such as Prometheus or InfluxDB are not required.
It is compatible with expvar package, that is also commonly used for monitoring.
Usage
// Create new metric. All metrics may take time frames if you want them to keep
// history. If no time frames are given the metric only keeps track of a single
// current value.
c := metric.NewCounter("15m10s") // 15 minutes of history with 10 second precision
// Increment counter
c.Add(1)
// Return JSON with all recorded counter values
c.String() // Or json.Marshal(c)
// With expvar
// Register a metric
expvar.Publish("latency", metric.NewHistogram("5m1s", "15m30s", "1h1m"))
// Register HTTP handler to visualize metrics
http.Handle("/debug/metrics", metric.Handler(metric.Exposed))
// Measure time and update the metric
start := time.Now()
...
expvar.Get("latency").(metric.Metric).Add(time.Since(start).Seconds())
Metrics are thread-safe and can be updated from background goroutines.
Web UI
Nothing fancy, really, but still better than reading plain JSON. No javascript, only good old HTML, CSS and SVG.
[web ui](example/screenshot.png)
Of course you may customize a list of metrics to show in the web UI.
If you need precise values - you may use /debug/vars
HTTP endpoint provided
by expvar
.
License
Code is distributed under MIT license, feel free to use it in your proprietary projects as well.
*Note that all licence references and agreements mentioned in the metric README section above
are relevant to that project's source code only.