googleapis / nodejs-logging

Node.js client for Stackdriver Logging: Store, search, analyze, monitor, and alert on log data and events from Google Cloud Platform and Amazon Web Services (AWS).
https://cloud.google.com/logging/
Apache License 2.0
173 stars 63 forks source link

Generated insertId with leading dots #1500

Closed yfyau closed 4 months ago

yfyau commented 6 months ago

Question

The auto generated insertId has strange leading dots. While this isn't a big deal, I'm wondering if I'm missing some properties needed to make it work. 😬

Screenshot 2024-04-23 at 12 19 49 PM

cindy-peng commented 4 months ago

Hi @yfyau, this is expected format and behavior. If insertId is omitted in LogEntry, our logging API will assign a unique identifier as insertID using eventID library. Since Javascript timestamps only have millisecond resolution making them unsuitable for the purpose of building monotonically increasing local ids, our service does use insertId from eventId as a secondary ordering for entries with the same timestamp.

yfyau commented 4 months ago

Got it. Thx 👍