vendor: bump docker/go-metrics v0.0.1:
full diff: 4ea375f775...v0.0.1
- docker/go-metrics#15 Add functions that instruments http handler using promhttp
- docker/go-metrics#20 Rename LICENSE.code → LICENSE
- docker/go-metrics#22 Support Go Modules
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
This commit is contained in:
12
vendor/github.com/docker/go-metrics/README.md
generated
vendored
12
vendor/github.com/docker/go-metrics/README.md
generated
vendored
@@ -68,6 +68,18 @@ If you need to use a unit but it is not defined in the package please open a PR
|
||||
|
||||
Package documentation can be found [here](https://godoc.org/github.com/docker/go-metrics).
|
||||
|
||||
## HTTP Metrics
|
||||
|
||||
To instrument a http handler, you can wrap the code like this:
|
||||
|
||||
```go
|
||||
namespace := metrics.NewNamespace("docker_distribution", "http", metrics.Labels{"handler": "your_http_handler_name"})
|
||||
httpMetrics := namespace.NewDefaultHttpMetrics()
|
||||
metrics.Register(namespace)
|
||||
instrumentedHandler = metrics.InstrumentHandler(httpMetrics, unInstrumentedHandler)
|
||||
```
|
||||
Note: The `handler` label must be provided when a new namespace is created.
|
||||
|
||||
## Additional Metrics
|
||||
|
||||
Additional metrics are also defined here that are not available in the prometheus client.
|
||||
|
||||
Reference in New Issue
Block a user