{"id":13614094,"url":"https://github.com/peterbourgon/trc","last_synced_at":"2025-08-23T13:14:48.345Z","repository":{"id":171745430,"uuid":"500131331","full_name":"peterbourgon/trc","owner":"peterbourgon","description":"In-process request tracing","archived":false,"fork":false,"pushed_at":"2025-07-06T18:36:13.000Z","size":903,"stargazers_count":97,"open_issues_count":2,"forks_count":1,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-07-06T19:39:06.285Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/peterbourgon.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,"zenodo":null}},"created_at":"2022-06-05T15:11:21.000Z","updated_at":"2025-06-10T17:04:22.000Z","dependencies_parsed_at":"2024-01-17T00:18:48.718Z","dependency_job_id":"0fb5c8e7-b822-4dbd-9a28-9e48f9a037e3","html_url":"https://github.com/peterbourgon/trc","commit_stats":null,"previous_names":["peterbourgon/trc"],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/peterbourgon/trc","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/peterbourgon%2Ftrc","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/peterbourgon%2Ftrc/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/peterbourgon%2Ftrc/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/peterbourgon%2Ftrc/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/peterbourgon","download_url":"https://codeload.github.com/peterbourgon/trc/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/peterbourgon%2Ftrc/sbom","scorecard":{"id":728732,"data":{"date":"2025-08-11","repo":{"name":"github.com/peterbourgon/trc","commit":"59cea6b5e7fd846099b1c5dbeab73456888958df"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":3.5,"checks":[{"name":"Code-Review","score":0,"reason":"Found 0/30 approved changesets -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Token-Permissions","score":0,"reason":"detected GitHub workflow tokens with excessive permissions","details":["Warn: no topLevel permission defined: .github/workflows/test.yaml:1","Info: no jobLevel write permissions found"],"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Maintained","score":1,"reason":"2 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 1","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Dangerous-Workflow","score":10,"reason":"no dangerous workflow patterns detected","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Pinned-Dependencies","score":0,"reason":"dependency not pinned by hash detected -- score normalized to 0","details":["Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/test.yaml:24: update your workflow using https://app.stepsecurity.io/secureworkflow/peterbourgon/trc/test.yaml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/test.yaml:29: update your workflow using https://app.stepsecurity.io/secureworkflow/peterbourgon/trc/test.yaml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/test.yaml:43: update your workflow using https://app.stepsecurity.io/secureworkflow/peterbourgon/trc/test.yaml/main?enable=pin","Warn: goCommand not pinned by hash: .github/workflows/test.yaml:56","Warn: goCommand not pinned by hash: .github/workflows/test.yaml:57","Warn: goCommand not pinned by hash: .github/workflows/test.yaml:58","Info:   0 out of   3 GitHub-owned GitHubAction dependencies pinned","Info:   0 out of   3 goCommand dependencies pinned"],"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: Apache License 2.0: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'main'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 3 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"name":"Vulnerabilities","score":10,"reason":"0 existing vulnerabilities detected","details":null,"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}}]},"last_synced_at":"2025-08-22T13:44:47.668Z","repository_id":171745430,"created_at":"2025-08-22T13:44:47.669Z","updated_at":"2025-08-22T13:44:47.669Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":271749003,"owners_count":24814102,"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-08-23T02:00:09.327Z","response_time":69,"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":[],"created_at":"2024-08-01T20:00:56.836Z","updated_at":"2025-08-23T13:14:48.274Z","avatar_url":"https://github.com/peterbourgon.png","language":"Go","funding_links":[],"categories":["Go"],"sub_categories":[],"readme":"# trc [![Go Reference](https://pkg.go.dev/badge/github.com/peterbourgon/trc.svg)](https://pkg.go.dev/github.com/peterbourgon/trc) ![Latest Release](https://img.shields.io/github/v/release/peterbourgon/trc?style=flat-square) ![Build Status](https://github.com/peterbourgon/trc/actions/workflows/test.yaml/badge.svg?branch=main)\n\ntrc provides in-process request tracing, an efficient alternative to logging.\nThe package is heavily inspired by https://golang.org/x/net/trace, much\ngratitude to those authors.\n\nMost users should import [package eztrc][eztrc], which offers an API designed\nfor most common use cases.\n\n[eztrc]: https://pkg.go.dev/github.com/peterbourgon/trc/eztrc\n\nHere's a quick-and-dirty usage example for a typical HTTP server.\n\n```go\nfunc main() {\n\tserver := NewServer(...) // your HTTP server\n\ttraced := eztrc.Middleware(categorize)(server)\n\tgo func() { log.Fatal(http.ListenAndServe(\":8080\", traced)) }() // normal API\n\n\ttraces := eztrc.Handler()\n\tgo func() { log.Fatal(http.ListenAndServe(\":8081\", traces)) }() // traces UI\n\n\tselect {}\n}\n\nfunc categorize(r *http.Request) string {\n\treturn r.Method + \" \" + r.URL.Path // assuming a fixed and finite set of possible paths\n}\n\nfunc someFunction(ctx context.Context, ...) {\n\teztrc.Tracef(ctx, \"this is a log statement\")\n\t// ...\n}\n```\n\nTraces can be viewed, queried, etc. through a web UI.\n\n\u003ckbd\u003e\u003cimg src=\"/ui.png\"/\u003e\u003c/kbd\u003e\n\nSee the examples directory for more complete example applications.\n\nThe current API is experimental and unstable. Breaking changes are guaranteed.\nUse at your own risk.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpeterbourgon%2Ftrc","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpeterbourgon%2Ftrc","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpeterbourgon%2Ftrc/lists"}