'use strict';

// === Generate a random 64-bit number in fixed-length hex format
function randomTraceId() {
  var digits = '0123456789abcdef';
  //var digits = '567';
  var n = '';
  for (let i = 0; i < 16; i++) {
    var rand = 0;
    if(i==0){
        rand = Math.floor(Math.random() * 8);
    } else{
     rand = Math.floor(Math.random() * 16);
   }
    n += digits[rand];
  }
    return n;
}

module.exports = randomTraceId;