Implemented as a wrapper of NodeJS Readable stream
yarn add ts-trace-event
import { TsTrace } from "ts-trace-event";
const tracer = new TsTrace();
tracer.pipe(process.stdin);
const { pid, E } = tracer.B({ name: `name`, cat: [`cat`] });
doSomething();
E(); //or
tracer.E({ name: `another-name`, cat: [`another-cat`], pid });
tracer.close();