googleapis / nodejs-logging-bunyan

Node.js client integration between Stackdriver Logging and Bunyan.
https://cloud.google.com/logging/
Apache License 2.0
63 stars 34 forks source link

Bunyan Logger - Trouble Formatting Request Logs for Latency #739

Closed rperez4 closed 5 months ago

rperez4 commented 5 months ago

When attempting audit logs our services request logging the the latency Property (based off definition requires a Duration Object) expects a number for the property nanos it is expecting a number rather than a long data type and the Bunyan logger throws an exception

Error: 3 INVALID_ARGUMENT: HTTP request latency: nanos=1166417584 This limits us from logging requests that are under a second. Wondering what could be causing this. Thanks

Screenshot 2024-03-21 at 4 42 39 PM Screenshot 2024-03-20 at 12 33 35 PM

Environment details