Project's Logo

docker/go-metrics

0/100

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

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's avatar

crosbymichael

16 Contributions

stevvooe's avatar

stevvooe

9 Contributions

tifayuki's avatar

tifayuki

5 Contributions

milosgajdos's avatar

milosgajdos

2 Contributions

LK4D4's avatar

LK4D4

1 Contributions

EdwardBetts's avatar

EdwardBetts

1 Contributions

jcarter3's avatar

jcarter3

1 Contributions

SamWhited's avatar

SamWhited

1 Contributions

waynr's avatar

waynr

1 Contributions