Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
(event): Log => {
const fields: Tag[] = [{ key: 'message.id', value: event.name }];
const attrs = event.attributes;
if (attrs) {
Object.keys(attrs).forEach(attr =>
fields.push({ key: attr, value: toTagValue(attrs[attr]) })
);
}
return { timestamp: hrTimeToMilliseconds(event.time), fields };
}
);