mirror of
https://github.com/redis/go-redis.git
synced 2026-10-28 16:35:06 +08:00
* chore(deps): bump golang.org/x/sys from 0.48.0 to 0.49.0 Bumps [golang.org/x/sys](https://github.com/golang/sys) from 0.48.0 to 0.49.0. - [Commits](https://github.com/golang/sys/compare/v0.48.0...v0.49.0) --- updated-dependencies: - dependency-name: golang.org/x/sys dependency-version: 0.49.0 dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> * chore(deps): go mod tidy submodules for x/sys 0.49.0 Example and extra modules still pinned x/sys v0.48.0, so govulncheck failed with "go mod tidy" in each of them. --------- Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Nedyalko Dyakov <nedyalko.dyakov@gmail.com>
Prometheus Metric Collector
This package implements a prometheus.Collector
for collecting metrics about the connection pool used by the various redis clients.
Supported clients are redis.Client, redis.ClusterClient, redis.Ring and redis.UniversalClient.
Example
client := redis.NewClient(options)
collector := redisprometheus.NewCollector(namespace, subsystem, client)
prometheus.MustRegister(collector)
Metrics
| Name | Type | Description |
|---|---|---|
pool_hit_total |
Counter metric | number of times a connection was found in the pool |
pool_miss_total |
Counter metric | number of times a connection was not found in the pool |
pool_timeout_total |
Counter metric | number of times a timeout occurred when getting a connection from the pool |
pool_conn_total_current |
Gauge metric | current number of connections in the pool |
pool_conn_idle_current |
Gauge metric | current number of idle connections in the pool |
pool_conn_stale_total |
Counter metric | number of times a connection was removed from the pool because it was stale |