nodejs-logging-winston
nodejs-logging-winston copied to clipboard
fix: Fix timestamp drift due to using instanceof typeguard
Thank you for opening a Pull Request! Before submitting your PR, there are a few things you can do to make sure it goes smoothly:
- [x] Make sure to open an issue as a bug/issue before writing your code! That way we can discuss the change, evaluate designs, and agree on the general idea
- [x] Ensure the tests and linter pass
- [x] Code coverage does not decrease (if any source code was changed)
- [x] Appropriate docs were updated (if necessary)
Fixes #802 🦕 This is to fix timestamp drift issue which may cause timestamp inaccuracy while using OpenTelemetry and view trace timespans. Since timestamp within metadata is defined as a union-types including null and undefined, the type guard is not necessary here.
Can you add any tests around this? Try to make one that would fail before the change, but passes after
Can you add any tests around this? Try to make one that would fail before the change, but passes after
Good suggestion. Will do!