Open shivaken opened 4 years ago
Thanks for submitting this.
This code is there because until recently, the way Scalyr stored logs on the server required each log coming from a single Scalyr session (represented in the plugin by @session
) to have an timestamp larger than any previous logs in that session (regardless of which log file/source it came from). Log lines failing to meet that condition were discarded.
This restriction was recently lifted, but we're still testing it out to confirm that everything works.
Once fully verified, this entire section of code will be removed, so for now, we'll likely hold off on merging it.
This PR adds an option 'ensure_log_order' to enable/disable a block of code to 'ensure timestamp is at least 1 nanosecond greater than the last one'.
This change might be needed in cases like us, sending log to Scalyr through a fluentd setup for routing purpose instead of sending it from server instances directly.