{"id":16269549,"url":"https://github.com/av/tohu","last_synced_at":"2026-03-05T16:48:30.386Z","repository":{"id":57377696,"uuid":"128651302","full_name":"av/tohu","owner":"av","description":"Code tracing and instrumentation","archived":false,"fork":false,"pushed_at":"2018-06-10T18:20:47.000Z","size":49,"stargazers_count":6,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2024-03-25T13:22:33.435Z","etag":null,"topics":["chrome","cool","http","instrumentation","javascript","javascript-library","npm-module","npm-package","tool","tracer","utility"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","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/av.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":"2018-04-08T14:46:48.000Z","updated_at":"2023-03-07T07:52:51.000Z","dependencies_parsed_at":"2022-09-19T03:30:23.081Z","dependency_job_id":null,"html_url":"https://github.com/av/tohu","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/av%2Ftohu","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/av%2Ftohu/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/av%2Ftohu/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/av%2Ftohu/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/av","download_url":"https://codeload.github.com/av/tohu/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244030758,"owners_count":20386532,"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":["chrome","cool","http","instrumentation","javascript","javascript-library","npm-module","npm-package","tool","tracer","utility"],"created_at":"2024-10-10T18:08:36.509Z","updated_at":"2026-03-05T16:48:30.288Z","avatar_url":"https://github.com/av.png","language":"JavaScript","readme":"![TOHU](assets/logo.png?raw=true \"TOHU\")\n--------\n|Code|    |Trace|\n|:----:|:----:|:----:|\n|![before](assets/code.png?raw=true \"Code\")|=\u003e|![after](assets/trace.png?raw=true \"Trace\")|\n\nSome information is just not suitable to be presented as logs and requires different visualisation. Good example are http calls performed by a server during processing of incoming request or events in a distributed system coming in undetermenistic order and duration.\nTohu can help transforming such information into format compatible with Chrome's about://tracing, which is awesome frontend for any traces and available almost everywhere alongside with Chrome.\n\n#### Quickstart\n- Install tohu\n```bash\nnpm i tohu --save\n```\n\n- Include it in your sources\n```javascript\nconst tohu = require('tohu');\n\n// one eternity later\ntohu.toFile('trace.json');\n```\n\n- View results with chrome tracing frontend\n  - Open chrome://tracing in Google Chrome\n  - Click \"Load\" at top left corner\n  - Select trace file stored by tohu\n\n#### Config\nTohu supports following configuration options with `tohu.setup()` call:\n```javascript\n{\n  // Enable/disable internal logging of\n  // additional debug infor\n  quiet: true,\n  \n  // When true, tohu will store request/response pair bodies \n  // for further analysis. Significantly increases trace file size.\n  storeBody: false,\n  \n  // Allows to specify transport for loggins, transport should suppoort \n  // three levels as methods: debug, info, error\n  log: console,\n  \n  // Defines output format of trace file. Defaults to Chrome's about://tracing\n  format: 'chrome-tracing',\n  \n  // Filename to use for storing trace. Will be stored\n  // inside the same directory from which node.js programm was launched\n  file: 'tohu.json'\n}\n```\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fav%2Ftohu","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fav%2Ftohu","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fav%2Ftohu/lists"}