{"id":15685959,"url":"https://github.com/devigned/tab","last_synced_at":"2025-04-15T05:56:32.884Z","repository":{"id":36204438,"uuid":"165307744","full_name":"devigned/tab","owner":"devigned","description":"OpenTracing and OpenCensus abstraction for tracing and logging","archived":false,"fork":false,"pushed_at":"2023-08-30T14:07:14.000Z","size":40,"stargazers_count":10,"open_issues_count":3,"forks_count":5,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-15T05:56:23.852Z","etag":null,"topics":["logging","opencensus","opentracing","tracing"],"latest_commit_sha":null,"homepage":null,"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/devigned.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2019-01-11T20:49:30.000Z","updated_at":"2024-07-26T09:50:19.000Z","dependencies_parsed_at":"2024-06-18T16:52:09.153Z","dependency_job_id":"91b12850-6d86-4678-82fd-69de366b1a4e","html_url":"https://github.com/devigned/tab","commit_stats":null,"previous_names":[],"tags_count":13,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/devigned%2Ftab","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/devigned%2Ftab/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/devigned%2Ftab/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/devigned%2Ftab/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/devigned","download_url":"https://codeload.github.com/devigned/tab/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":249016320,"owners_count":21198832,"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","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":["logging","opencensus","opentracing","tracing"],"created_at":"2024-10-03T17:33:41.429Z","updated_at":"2025-04-15T05:56:32.867Z","avatar_url":"https://github.com/devigned.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Trace Abstraction (tab)\n[![Go Report Card](https://goreportcard.com/badge/github.com/devigned/tab)](https://goreportcard.com/report/github.com/devigned/tab)\n[![godoc](https://godoc.org/github.com/devigned/tab?status.svg)](https://godoc.org/github.com/devigned/tab)\n[![Build Status](https://travis-ci.org/devigned/tab.svg?branch=master)](https://travis-ci.org/devigned/tab)\n[![Coverage Status](https://coveralls.io/repos/github/devigned/tab/badge.svg?branch=master)](https://coveralls.io/github/devigned/tab?branch=master)\n\nOpenTracing and OpenCensus abstraction for tracing and logging. \n\nWhy? Well, sometimes you want to let the consumer choose the tracing / logging implementation.\n\n## Getting Started\n### Installing the library\n\n```\ngo get -u github.com/devigned/tab\n```\n\nIf you need to install Go, follow [the official instructions](https://golang.org/dl/)\n\n### Usage\n\n```go\npackage main\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\t\n\t\"github.com/devigned/tab\"\n\t_ \"github.com/devigned/tab/opencensus\" // use OpenCensus\n\t// _ \"github.com/devigned/tab/opentracing\" // use OpenTracing\n)\n\nfunc main() {\n\t// start a root span\n\tctx, span := tab.StartSpan(context.Background(), \"main\")\n\tdefer span.End() // close span when done\n\t\n\t// pass context w/ span to child func\n\tprintHelloWorld(ctx)\n}\n\nfunc printHelloWorld(ctx context.Context) {\n\t// start new span from parent\n\t_, span := tab.StartSpan(ctx, \"printHelloWorld\")\n\tdefer span.End() // close span when done\n\t\n\t// add attribute to span\n\tspan.AddAttributes(tab.StringAttribute(\"interesting\", \"value\"))\n\tfmt.Println(\"Hello World!\")\n\ttab.For(ctx).Info(\"after println call\")\n}\n\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdevigned%2Ftab","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdevigned%2Ftab","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdevigned%2Ftab/lists"}