You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Across our six clusters we have more than 300 services, all of which emit logs using an ISO 8601 / RFC 3339 timestamp. Before these logs reach our centralised log store they go through a parsing and enrichment pipeline, and part of that process relies on timestamps being in that specific format.
Before I start modifying the enrichment logic, I wanted to check whether it’s possible to configure the timestamp format when using structured logging with json_log.
From a quick look at the source, it appears the router uses Zap, which does support custom timestamp encoders. I'm not a go engineer so I could be reading this wrong. However, I haven’t been able to find anything in the in the docs that explains how to configure this within the router.
Is there a way to override or configure the timestamp format?
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
-
Hi,
Across our six clusters we have more than 300 services, all of which emit logs using an ISO 8601 / RFC 3339 timestamp. Before these logs reach our centralised log store they go through a parsing and enrichment pipeline, and part of that process relies on timestamps being in that specific format.
Before I start modifying the enrichment logic, I wanted to check whether it’s possible to configure the timestamp format when using structured logging with json_log.
From a quick look at the source, it appears the router uses Zap, which does support custom timestamp encoders. I'm not a go engineer so I could be reading this wrong. However, I haven’t been able to find anything in the in the docs that explains how to configure this within the router.
Is there a way to override or configure the timestamp format?
Thanks
Beta Was this translation helpful? Give feedback.
All reactions