Skip to content


Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?

Latest commit


Git stats


Failed to load latest commit information.
Latest commit message
Commit time


Code Trace
before => after

Some 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. Tohu 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.


  • Install tohu
npm i tohu --save
  • Include it in your sources
const tohu = require('tohu');

// one eternity later
  • View results with chrome tracing frontend
    • Open chrome://tracing in Google Chrome
    • Click "Load" at top left corner
    • Select trace file stored by tohu


Tohu supports following configuration options with tohu.setup() call:

  // Enable/disable internal logging of
  // additional debug infor
  quiet: true,
  // When true, tohu will store request/response pair bodies 
  // for further analysis. Significantly increases trace file size.
  storeBody: false,
  // Allows to specify transport for loggins, transport should suppoort 
  // three levels as methods: debug, info, error
  log: console,
  // Defines output format of trace file. Defaults to Chrome's about://tracing
  format: 'chrome-tracing',
  // Filename to use for storing trace. Will be stored
  // inside the same directory from which node.js programm was launched
  file: 'tohu.json'