From 1700cfb1c741d303cce4fd9f9aa52c52f6a91ac8 Mon Sep 17 00:00:00 2001 From: Daniel Nelson Date: Mon, 18 Nov 2019 10:24:22 -0800 Subject: [PATCH] Use nanosecond precision in docker_log input (#6663) --- plugins/inputs/docker_log/docker_log.go | 1 + 1 file changed, 1 insertion(+) diff --git a/plugins/inputs/docker_log/docker_log.go b/plugins/inputs/docker_log/docker_log.go index 81268f5f5..7cb2d94be 100644 --- a/plugins/inputs/docker_log/docker_log.go +++ b/plugins/inputs/docker_log/docker_log.go @@ -203,6 +203,7 @@ func (d *DockerLogs) matchedContainerName(names []string) string { func (d *DockerLogs) Gather(acc telegraf.Accumulator) error { ctx := context.Background() + acc.SetPrecision(time.Nanosecond) ctx, cancel := context.WithTimeout(ctx, d.Timeout.Duration) defer cancel()