docker/go-metrics
The go-metrics package is a small wrapper around the Prometheus Go client designed to help enforce consistent naming and best practices for metrics collection in Docker projects. It is not intended to replace the Prometheus client but to ensure that metrics collected adhere to a set of Docker-specific rules.
To use this package, create a namespace and subsystem, declare your metrics, use labels instead of multiple metrics, and always use a unit. Namespaces allow you to specify the same namespace and subsystem for your metrics and attach constant labels. Keep all metric declarations in one file for easy reference. Use labels to define one metric for various actions and specify the label name when adding data points. Always provide a unit for your metric.
The package also includes documentation and support for instrumenting HTTP handlers. Additional metrics not available in the Prometheus client can be defined here if they are generic enough to be used by multiple projects.
The go-metrics package is released under the Apache 2.0 license for code and the Creative Commons Attribution 4.0 International License for the README.md file and files in the “docs” folder. For more information, please refer to the package documentation at https://godoc.org/github.com/docker/go-metrics.
Project Information
- Repository: docker/go-metrics
- Owner: docker
- Language: Go
- Created at: 2016-08-05
- Last Updated: 2024-04-02
Engagement Metrics
- Stars: 85
- Forks: 32
- Open Issues: 6
- Watchers: 85
- Subscribers: 10
Contribution Opportunities
- Issues are available for contributions.
- Project boards are active.
- Wiki is available for documentation and guides.
License
Apache License 2.0
Recent Contributors
crosbymichael
16 Contributions
stevvooe
9 Contributions
tifayuki
5 Contributions
milosgajdos
2 Contributions
LK4D4
1 Contributions
EdwardBetts
1 Contributions
jcarter3
1 Contributions
SamWhited
1 Contributions
waynr
1 Contributions