Bunyan 1.8.15 crashed: TypeError: rec.msg.indexOf is not a function

Author: HsnImamCreated Feb 23, 2026Updated Feb 23, 2026

  • platform: darwin
  • node version: v18.20.3
  • bunyan version: 1.8.15
  • argv: ["/Users/hassan/.nvm/versions/node/v18.20.3/bin/node","/Users/hassan/Desktop/projects/eligibility-service/node_modules/.bin/bunyan"]
  • log line: "{"name":"dario-eligibility-service-qa","hostname":"Hassan-Imam-XTWKX7L995","pid":16766,"level":50,"msg":{"stack":"Error: PeriodicExportingMetricReader: metrics export failed (error Error: 14 UNAVAILABLE: No connection established. Last error: Error: connect ECONNREFUSED 127.0.0.1:4317. Resolution note: )\n at doExport (/Users/hassan/Desktop/projects/eligibility-service/node_modules/@opentelemetry/sdk-metrics/src/export/PeriodicExportingMetricReader.ts:133:15)\n at process.processTicksAndRejections (node:internal/process/task_queues:95:5)\n at PeriodicExportingMetricReader._doRun (/Users/hassan/Desktop/projects/eligibility-service/node_modules/@opentelemetry/sdk-metrics/src/export/PeriodicExportingMetricReader.ts:148:7)\n at PeriodicExportingMetricReader._runOnce (/Users/hassan/Desktop/projects/eligibility-service/node_modules/@opentelemetry/sdk-metrics/src/export/PeriodicExportingMetricReader.ts:104:7)","message":"PeriodicExportingMetricReader: metrics export failed (error Error: 14 UNAVAILABLE: No connection established. Last error: Error: connect ECONNREFUSED 127.0.0.1:4317. Resolution note: )","name":"Error"},"time":"2026-02-23T05:21:27.350Z","src":{"file":"/Users/hassan/Desktop/projects/eligibility-service/src/coralogix-apm/coralogix-apm.service.ts","line":85,"func":"error"},"v":0}"
  • stack:
  • TypeError: rec.msg.indexOf is not a function
  •     at emitRecord (/Users/hassan/Desktop/projects/eligibility-service/node_modules/bunyan/bin/bunyan:851:21)
  •     at handleLogLine (/Users/hassan/Desktop/projects/eligibility-service/node_modules/bunyan/bin/bunyan:741:16)
  •     at Socket.<anonymous> (/Users/hassan/Desktop/projects/eligibility-service/node_modules/bunyan/bin/bunyan:1202:13)
  •     at Socket.emit (node:events:517:28)
  •     at addChunk (node:internal/streams/readable:368:12)
  •     at readableAddChunk (node:internal/streams/readable:337:11)
  •     at Readable.push (node:internal/streams/readable:278:10)
  •     at Pipe.onStreamRead (node:internal/stream_base_commons:190:23)
Waiting for the debugger to disconnect...
Waiting for the debugger to disconnect...
node:events:495
      throw er; // Unhandled 'error' event
      ^

Error: write EPIPE
    at __node_internal_captureLargerStackTrace (node:internal/errors:496:5)
    at __node_internal_errnoException (node:internal/errors:623:12)
    at afterWriteDispatched (node:internal/stream_base_commons:160:15)
    at writeGeneric (node:internal/stream_base_commons:151:3)
    at Socket._writeGeneric (node:net:962:11)
    at Socket._write (node:net:974:8)
    at writeOrBuffer (node:internal/streams/writable:392:12)
    at _write (node:internal/streams/writable:333:10)
    at Writable.write (node:internal/streams/writable:337:10)
    at RedactStream._write (/Users/hassan/Desktop/projects/eligibility-service/node_modules/dario-node-utils/src/utils/logger/index.ts:57:20)
    at writeOrBuffer (node:internal/streams/writable:392:12)
    at _write (node:internal/streams/writable:333:10)
    at Writable.write (node:internal/streams/writable:337:10)
    at Logger._emit (/Users/hassan/Desktop/projects/eligibility-service/node_modules/bunyan/lib/bunyan.js:923:22)
    at Logger.error (/Users/hassan/Desktop/projects/eligibility-service/node_modules/bunyan/lib/bunyan.js:1045:24)
    at Object.error (/Users/hassan/Desktop/projects/eligibility-service/src/coralogix-apm/coralogix-apm.service.ts:85:16)
    at DiagAPI.error (/Users/hassan/Desktop/projects/eligibility-service/node_modules/@opentelemetry/api/src/api/diag.ts:60:32)
    at <anonymous> (/Users/hassan/Desktop/projects/eligibility-service/node_modules/@opentelemetry/core/src/common/logging-error-handler.ts:26:10)
    at globalErrorHandler (/Users/hassan/Desktop/projects/eligibility-service/node_modules/@opentelemetry/core/src/common/global-error-handler.ts:38:5)
    at PeriodicExportingMetricReader._runOnce (/Users/hassan/Desktop/projects/eligibility-service/node_modules/@opentelemetry/sdk-metrics/src/export/PeriodicExportingMetricReader.ts:114:25)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
Emitted 'error' event on Socket instance at:
    at emitErrorNT (node:internal/streams/destroy:151:8)
    at emitErrorCloseNT (node:internal/streams/destroy:116:3)
    at process.processTicksAndRejections (node:internal/process/task_queues:82:21) {
  errno: -32,
  code: 'EPIPE',
  syscall: 'write'
}

Node.js v18.20.3