Added Unix epoch timestamp support for JSON parser (#4633)
This commit is contained in:
@@ -131,6 +131,12 @@ config "json_time_key" and "json_time_format". If "json_time_key" is set,
|
||||
"json_time_format" must be specified. The "json_time_key" describes the
|
||||
name of the field containing time information. The "json_time_format"
|
||||
must be a recognized Go time format.
|
||||
If parsing a Unix epoch timestamp in seconds, e.g. 1536092344.1, this config must be set to "unix" (case insensitive);
|
||||
corresponding JSON value can have a decimal part and can be a string or a number JSON representation.
|
||||
If value is in number representation, it'll be treated as a double precision float, and could have some precision loss.
|
||||
If value is in string representation, there'll be no precision loss up to nanosecond precision. Decimal positions beyond that will be dropped.
|
||||
If parsing a Unix epoch timestamp in milliseconds, e.g. 1536092344100, this config must be set to "unix_ms" (case insensitive);
|
||||
corresponding JSON value must be a (long) integer and be in number JSON representation.
|
||||
If there is no year provided, the metrics will have the current year.
|
||||
More info on time formats can be found here: https://golang.org/pkg/time/#Parse
|
||||
|
||||
|
||||
Reference in New Issue
Block a user