microsoft / ApplicationInsights-node.js

Microsoft Application Insights SDK for Node.js
MIT License
324 stars 141 forks source link

`undefined`, `null`, and `Date` types are serialized differently in 2.5.1 #1118

Closed ryanbecker closed 1 year ago

ryanbecker commented 1 year ago

undefined, null, and Date types are serializing differently in version 2.5.1. I confirmed with an updated unit test: https://github.com/microsoft/ApplicationInsights-node.js/compare/develop...ryanbecker:ApplicationInsights-node.js:feature/data-type-serialization-issue.

Prior to 2.5.1: undefined -> '' null -> '' new Date('2023-03-30T01:02:03.004Z') -> '2023-03-30T01:02:03.004Z'

After 2.5.1: undefined -> 'undefined' null -> 'null' new Date('2023-03-30T01:02:03.004Z') -> '"2023-03-30T01:02:03.004Z"'

Maybe something changed with this commit? https://github.com/microsoft/ApplicationInsights-node.js/commit/bdcd8f70b3bc9b600624c4e1d183edbbbd341517