-
Notifications
You must be signed in to change notification settings - Fork 210
Description
Component(s)
No response
Is your feature request related to a problem? Please describe.
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 to handle unix timestamps, 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. 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?
Describe the solution you'd like
I'd like to be able to specify a time format in the configuration similar to how I specify log-level. A subset of standard time formats from strptime would be great.
access_logs:
timestamp_format: iso_8601 # Default: unix_epoch
Describe alternatives you've considered
Parsing and modifying the logs before being sent to the centralised log system.
Additional context
No response