Logs from different services have mismatched timestamps and some appear "in the future". How do you fix it?
IntermediateScenarioLogging Pipelines
Answer
Situation read → Mix of local time zones, missing time zones in log formats, clock drift, or the shipper using ingest time.
What I'd do →
- Standardise on UTC with RFC 3339 timestamps (
2026-03-02T10:15:01.123Z) in all apps. - Parse the app timestamp in the shipper (Alloy
stage.timestamp, Fluent Bit parserTime_Key/Time_Format). - Ensure NTP/chrony is running and alert on
node_timex_offset_secondsabove 50 ms. - Check Loki's
reject_old_samples_max_ageandcreation_grace_periodfor rejected entries.
Why → Correlation across services is only as good as clock and format consistency.
Interview tip → Clock drift silently breaks trace and log correlation; monitor it.
More on Logging Pipelines
Developers SSH into servers and `grep` log files to debug. You are asked to centralise logging. Where do you start?BeginnerYour app writes free-text logs like `User 42 paid 19.99 in 340ms`. Why push for structured logging, and how?BeginnerLoki ingestion is failing with `stream limit exceeded` and the ingester memory is exploding. What happened?IntermediateFluent Bit pods on busy nodes are dropping logs during traffic spikes. How do you make the pipeline lossless?IntermediateThe Elasticsearch cluster for logs goes red every Monday after the weekend batch jobs. How do you stabilise it?AdvancedFinance says the log bill doubled in a quarter. How do you cut it without losing debugging ability?Intermediate