{"id":41126479,"url":"https://github.com/panjiang/redisotelv8","last_synced_at":"2026-01-22T18:08:38.991Z","repository":{"id":65331551,"uuid":"585463430","full_name":"panjiang/redisotelv8","owner":"panjiang","description":"Export go-redis v8 client performance metrics with otel for prometheus.","archived":false,"fork":false,"pushed_at":"2023-01-05T08:38:54.000Z","size":23,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2024-06-20T08:09:31.488Z","etag":null,"topics":["go-redis","metrics","otel","prometheus","v8"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/panjiang.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2023-01-05T08:31:34.000Z","updated_at":"2024-06-20T08:09:31.489Z","dependencies_parsed_at":"2023-02-03T21:01:34.777Z","dependency_job_id":null,"html_url":"https://github.com/panjiang/redisotelv8","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/panjiang/redisotelv8","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/panjiang%2Fredisotelv8","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/panjiang%2Fredisotelv8/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/panjiang%2Fredisotelv8/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/panjiang%2Fredisotelv8/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/panjiang","download_url":"https://codeload.github.com/panjiang/redisotelv8/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/panjiang%2Fredisotelv8/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28667881,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-22T17:07:18.858Z","status":"ssl_error","status_checked_at":"2026-01-22T17:05:02.040Z","response_time":144,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["go-redis","metrics","otel","prometheus","v8"],"created_at":"2026-01-22T18:08:38.269Z","updated_at":"2026-01-22T18:08:38.983Z","avatar_url":"https://github.com/panjiang.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# OpenTelemetry instrumentation metrics for go-redis v8\n\n## Installation\n\n```shell\ngo get github.com/panjiang/redisotelv8\n```\n\n## Usage\n\n\n```go\nimport (\n\t\"time\"\n\n\tredisotel \"github.com/panjiang/redisotelv8\"\n\t\"github.com/go-redis/redis/v8\"\n)\n\nrdb := redis.NewUniversalClient(\u0026redis.UniversalOptions{\n    Addrs: []string{\"localhost:7000\"},\n})\n\nif err := redisotel.ExportMetricsForPrometheus(rdb, redisotel.WithSlowDur(time.Second)); err != nil {\n    panic(err)\n}\n```\n\nOr\n\n```go\nimport (\n\t\"time\"\n\n\tredisotel \"github.com/panjiang/redisotelv8\"\n\t\"github.com/go-redis/redis/v8\"\n)\n\nrdb := redis.NewUniversalClient(\u0026redis.UniversalOptions{\n    Addrs: []string{\"localhost:7000\"},\n})\n\nmp, err := redisotel.NewPrometheusMeterProvider()\nif err != nil {\n    panic(err)\n}\n\nif err := redisotel.InstrumentMetrics(rdb, redisotel.WithMeterProvider(mp)); err != nil {\n    panic(err)\n}\n```\n\n## Metrics\n\n```plaintext\n# HELP db_client_connections_idle_min The minimum number of idle open connections allowed\n# TYPE db_client_connections_idle_min gauge\ndb_client_connections_idle_min{db_system=\"redis\",otel_scope_name=\"redisotel\",otel_scope_version=\"8.11.5\",pool_name=\"127.0.0.1:7000\"} 0\ndb_client_connections_idle_min{db_system=\"redis\",otel_scope_name=\"redisotel\",otel_scope_version=\"8.11.5\",pool_name=\"127.0.0.1:7001\"} 0\ndb_client_connections_idle_min{db_system=\"redis\",otel_scope_name=\"redisotel\",otel_scope_version=\"8.11.5\",pool_name=\"127.0.0.1:7002\"} 0\n# HELP db_client_connections_max The maximum number of open connections allowed\n# TYPE db_client_connections_max gauge\ndb_client_connections_max{db_system=\"redis\",otel_scope_name=\"redisotel\",otel_scope_version=\"8.11.5\",pool_name=\"127.0.0.1:7000\"} 40\ndb_client_connections_max{db_system=\"redis\",otel_scope_name=\"redisotel\",otel_scope_version=\"8.11.5\",pool_name=\"127.0.0.1:7001\"} 40\ndb_client_connections_max{db_system=\"redis\",otel_scope_name=\"redisotel\",otel_scope_version=\"8.11.5\",pool_name=\"127.0.0.1:7002\"} 40\n# HELP db_client_connections_timeouts The number of connection timeouts that have occurred trying to obtain a connection from the pool\n# TYPE db_client_connections_timeouts gauge\ndb_client_connections_timeouts{db_system=\"redis\",otel_scope_name=\"redisotel\",otel_scope_version=\"8.11.5\",pool_name=\"127.0.0.1:7000\"} 0\ndb_client_connections_timeouts{db_system=\"redis\",otel_scope_name=\"redisotel\",otel_scope_version=\"8.11.5\",pool_name=\"127.0.0.1:7001\"} 0\ndb_client_connections_timeouts{db_system=\"redis\",otel_scope_name=\"redisotel\",otel_scope_version=\"8.11.5\",pool_name=\"127.0.0.1:7002\"} 0\n# HELP db_client_connections_usage The number of connections that are currently in state described by the state attribute\n# TYPE db_client_connections_usage gauge\ndb_client_connections_usage{db_system=\"redis\",otel_scope_name=\"redisotel\",otel_scope_version=\"8.11.5\",pool_name=\"127.0.0.1:7000\",state=\"idle\"} 1\ndb_client_connections_usage{db_system=\"redis\",otel_scope_name=\"redisotel\",otel_scope_version=\"8.11.5\",pool_name=\"127.0.0.1:7000\",state=\"used\"} 0\ndb_client_connections_usage{db_system=\"redis\",otel_scope_name=\"redisotel\",otel_scope_version=\"8.11.5\",pool_name=\"127.0.0.1:7001\",state=\"idle\"} 1\ndb_client_connections_usage{db_system=\"redis\",otel_scope_name=\"redisotel\",otel_scope_version=\"8.11.5\",pool_name=\"127.0.0.1:7001\",state=\"used\"} 1\ndb_client_connections_usage{db_system=\"redis\",otel_scope_name=\"redisotel\",otel_scope_version=\"8.11.5\",pool_name=\"127.0.0.1:7002\",state=\"idle\"} 2\ndb_client_connections_usage{db_system=\"redis\",otel_scope_name=\"redisotel\",otel_scope_version=\"8.11.5\",pool_name=\"127.0.0.1:7002\",state=\"used\"} 0\n# HELP db_client_connections_use_time_milliseconds The time between borrowing a connection and returning it to the pool.\n# TYPE db_client_connections_use_time_milliseconds histogram\ndb_client_connections_use_time_milliseconds_bucket{db_system=\"redis\",otel_scope_name=\"redisotel\",otel_scope_version=\"8.11.5\",pool_name=\"127.0.0.1:7000\",status=\"ok\",type=\"command\",le=\"0\"} 5\ndb_client_connections_use_time_milliseconds_bucket{db_system=\"redis\",otel_scope_name=\"redisotel\",otel_scope_version=\"8.11.5\",pool_name=\"127.0.0.1:7000\",status=\"ok\",type=\"command\",le=\"5\"} 5\ndb_client_connections_use_time_milliseconds_bucket{db_system=\"redis\",otel_scope_name=\"redisotel\",otel_scope_version=\"8.11.5\",pool_name=\"127.0.0.1:7000\",status=\"ok\",type=\"command\",le=\"10\"} 5\ndb_client_connections_use_time_milliseconds_bucket{db_system=\"redis\",otel_scope_name=\"redisotel\",otel_scope_version=\"8.11.5\",pool_name=\"127.0.0.1:7000\",status=\"ok\",type=\"command\",le=\"25\"} 5\ndb_client_connections_use_time_milliseconds_bucket{db_system=\"redis\",otel_scope_name=\"redisotel\",otel_scope_version=\"8.11.5\",pool_name=\"127.0.0.1:7000\",status=\"ok\",type=\"command\",le=\"50\"} 5\ndb_client_connections_use_time_milliseconds_bucket{db_system=\"redis\",otel_scope_name=\"redisotel\",otel_scope_version=\"8.11.5\",pool_name=\"127.0.0.1:7000\",status=\"ok\",type=\"command\",le=\"75\"} 5\ndb_client_connections_use_time_milliseconds_bucket{db_system=\"redis\",otel_scope_name=\"redisotel\",otel_scope_version=\"8.11.5\",pool_name=\"127.0.0.1:7000\",status=\"ok\",type=\"command\",le=\"100\"} 5\ndb_client_connections_use_time_milliseconds_bucket{db_system=\"redis\",otel_scope_name=\"redisotel\",otel_scope_version=\"8.11.5\",pool_name=\"127.0.0.1:7000\",status=\"ok\",type=\"command\",le=\"250\"} 5\ndb_client_connections_use_time_milliseconds_bucket{db_system=\"redis\",otel_scope_name=\"redisotel\",otel_scope_version=\"8.11.5\",pool_name=\"127.0.0.1:7000\",status=\"ok\",type=\"command\",le=\"500\"} 5\ndb_client_connections_use_time_milliseconds_bucket{db_system=\"redis\",otel_scope_name=\"redisotel\",otel_scope_version=\"8.11.5\",pool_name=\"127.0.0.1:7000\",status=\"ok\",type=\"command\",le=\"750\"} 5\ndb_client_connections_use_time_milliseconds_bucket{db_system=\"redis\",otel_scope_name=\"redisotel\",otel_scope_version=\"8.11.5\",pool_name=\"127.0.0.1:7000\",status=\"ok\",type=\"command\",le=\"1000\"} 5\ndb_client_connections_use_time_milliseconds_bucket{db_system=\"redis\",otel_scope_name=\"redisotel\",otel_scope_version=\"8.11.5\",pool_name=\"127.0.0.1:7000\",status=\"ok\",type=\"command\",le=\"2500\"} 5\ndb_client_connections_use_time_milliseconds_bucket{db_system=\"redis\",otel_scope_name=\"redisotel\",otel_scope_version=\"8.11.5\",pool_name=\"127.0.0.1:7000\",status=\"ok\",type=\"command\",le=\"5000\"} 5\ndb_client_connections_use_time_milliseconds_bucket{db_system=\"redis\",otel_scope_name=\"redisotel\",otel_scope_version=\"8.11.5\",pool_name=\"127.0.0.1:7000\",status=\"ok\",type=\"command\",le=\"7500\"} 5\ndb_client_connections_use_time_milliseconds_bucket{db_system=\"redis\",otel_scope_name=\"redisotel\",otel_scope_version=\"8.11.5\",pool_name=\"127.0.0.1:7000\",status=\"ok\",type=\"command\",le=\"10000\"} 5\ndb_client_connections_use_time_milliseconds_bucket{db_system=\"redis\",otel_scope_name=\"redisotel\",otel_scope_version=\"8.11.5\",pool_name=\"127.0.0.1:7000\",status=\"ok\",type=\"command\",le=\"+Inf\"} 5\ndb_client_connections_use_time_milliseconds_sum{db_system=\"redis\",otel_scope_name=\"redisotel\",otel_scope_version=\"8.11.5\",pool_name=\"127.0.0.1:7000\",status=\"ok\",type=\"command\"} 0\ndb_client_connections_use_time_milliseconds_count{db_system=\"redis\",otel_scope_name=\"redisotel\",otel_scope_version=\"8.11.5\",pool_name=\"127.0.0.1:7000\",status=\"ok\",type=\"command\"} 5\n```\n\n## Refrences\n\n- https://github.com/go-redis/redis/tree/master/extra/redisotel","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpanjiang%2Fredisotelv8","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpanjiang%2Fredisotelv8","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpanjiang%2Fredisotelv8/lists"}