_transformBunyanRecord(state, bunyanLogRecord) {
    // eslint-disable-next-line no-unused-vars, @typescript-eslint/no-unused-vars
    const { cat: rawCat, msg: name, ph, pid, tid: _tid, time, name: _name, hostname: _hostname, ...args } = bunyanLogRecord;
    const ts = new Date(time).getTime() * 1E3;
    const cat = rawCat || 'undefined';
    const tid = this._resolveGlobalTID(bunyanLogRecord);

    const builder = new SimpleEventBuilder();
    if (!state.knownPids.has(pid)) {
      if (Number.isNaN(state.primaryPid)) {
        state.primaryPid = pid;
      }

      builder.metadata({ pid, ts, name: 'process_name', args: { name: pid === state.primaryPid ? 'primary' : 'secondary' } });
      builder.metadata({ pid, ts, name: 'process_sort_index', args: { sort_index: state.knownPids.size } });
      state.knownPids.add(pid);
    }

    if (!state.knownTids.has(tid)) {
      const mainCategory = getMainCategory(cat);
      builder.metadata({ pid, tid, ts, name: 'thread_name', args: { name: mainCategory } });
      builder.metadata({ pid, tid, ts, name: 'thread_sort_index', args: { sort_index: tid } });
      state.knownTids.add(tid);
    }

    const event = { ph, name, pid, tid, cat, ts, args };
    if (ph === 'E') {
      delete event.name;
    }

    builder.events.push(event);
    return builder.events;
  }
@param {{ knownPids: Set<number>; knownTids: Set<number>; primaryPid: number; }} state
@param {*} bunyanLogRecord
@returns {import('trace-event-lib').Event[]}
@private