Skip to content

Commit

Permalink
fix: pino agent stream messages were undefined
Browse files Browse the repository at this point in the history
  • Loading branch information
abhilash-sivan committed Jan 13, 2025
1 parent 41c09b8 commit 9472c5c
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions packages/collector/src/agent/loggerToAgentStream.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,12 @@ module.exports = {
* @param {*} record
*/
write: function write(record) {
try {
record = JSON.parse(record);
} catch (error) {
// ignore
}

const logLevel = getAgentLogLevel(record.level);
let message = `Node.js collector (pid: ${process.pid}, reporting pid: ${pidStore.pid}): ${record.msg}`;
let stack = null;
Expand Down

0 comments on commit 9472c5c

Please sign in to comment.