{"id":30883370,"url":"https://github.com/globocom/go-redis-opentracing","last_synced_at":"2025-09-08T09:45:10.960Z","repository":{"id":57556083,"uuid":"316037276","full_name":"globocom/go-redis-opentracing","owner":"globocom","description":"go-redis hook to collect OpenTracing spans","archived":false,"fork":false,"pushed_at":"2020-11-27T14:16:59.000Z","size":28,"stargazers_count":22,"open_issues_count":0,"forks_count":2,"subscribers_count":9,"default_branch":"main","last_synced_at":"2025-04-06T08:36:37.639Z","etag":null,"topics":["go-redis","golang","opentracing"],"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/globocom.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":"2020-11-25T19:38:44.000Z","updated_at":"2024-06-06T12:52:49.000Z","dependencies_parsed_at":"2022-09-02T11:01:13.749Z","dependency_job_id":null,"html_url":"https://github.com/globocom/go-redis-opentracing","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/globocom/go-redis-opentracing","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/globocom%2Fgo-redis-opentracing","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/globocom%2Fgo-redis-opentracing/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/globocom%2Fgo-redis-opentracing/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/globocom%2Fgo-redis-opentracing/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/globocom","download_url":"https://codeload.github.com/globocom/go-redis-opentracing/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/globocom%2Fgo-redis-opentracing/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":274166945,"owners_count":25233959,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-09-08T02:00:09.813Z","response_time":121,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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","golang","opentracing"],"created_at":"2025-09-08T09:45:07.825Z","updated_at":"2025-09-08T09:45:10.952Z","avatar_url":"https://github.com/globocom.png","language":"Go","funding_links":[],"categories":["Go"],"sub_categories":[],"readme":"# go-redis-opentracing\n\n\u003cp\u003e\n  \u003cimg src=\"https://img.shields.io/github/workflow/status/globocom/go-redis-opentracing/Go?style=flat-square\"\u003e\n  \u003ca href=\"https://github.com/globocom/go-redis-opentracing/blob/master/LICENSE\"\u003e\n    \u003cimg src=\"https://img.shields.io/github/license/globocom/go-buffer?color=blue\u0026style=flat-square\"\u003e\n  \u003c/a\u003e\n  \u003cimg src=\"https://img.shields.io/github/go-mod/go-version/globocom/go-redis-opentracing?style=flat-square\"\u003e\n  \u003ca href=\"https://pkg.go.dev/github.com/globocom/go-redis-opentracing\"\u003e\n    \u003cimg src=\"https://img.shields.io/badge/Go-reference-blue?style=flat-square\"\u003e\n  \u003c/a\u003e\n\u003c/p\u003e\n\n\n[go-redis](https://github.com/go-redis/redis) hook to collect OpenTracing spans.\n\nThere are similar older libs that do not benefit from go-redis newer hooks feature. \nThis is heavily inspired by https://github.com/go-redis/redis/blob/master/extra/redisotel/redisotel.go, \nbut with support for OpenTracing instead of OpenTelemetry.\n\nAlso check out our lib https://github.com/globocom/go-redis-prometheus.\n\n## Installation\n\n    go get github.com/globocom/go-redis-opentracing\n    \n## Usage\n\n```golang\npackage main\n\nimport (\n\tredisopentracing \"github.com/globocom/go-redis-opentracing\"\n\t\"github.com/go-redis/redis/v8\"\n\tjaegerConfig \"github.com/uber/jaeger-client-go/config\"\n)\n\nfunc main() {\n\tcfg := \u0026jaegerConfig.Configuration{\n\t\tServiceName: \"my-service-name\",\n\t}\n\ttracer, _, _ := cfg.NewTracer()\n\n\thook := redisopentracing.NewHook(tracer)\n\n\tclient := redis.NewClient(\u0026redis.Options{\n\t\tAddr:     \"localhost:6379\",\n\t\tPassword: \"\",\n\t})\n\tclient.AddHook(hook)\n\n\t// run redis commands...\n}\n```\n\n## Note on pipelines\n\nPipelines generate a single span. For each error that occurs on the pipeline, a tag `db.error\u003ccommandIndex\u003e` will be set.\n\n## API stability\n\nThe API is unstable at this point, and it might change before `v1.0.0` is released.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fglobocom%2Fgo-redis-opentracing","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fglobocom%2Fgo-redis-opentracing","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fglobocom%2Fgo-redis-opentracing/lists"}