Use nanosecond precision in docker_log input (#6663)

This commit is contained in:
Daniel Nelson
2019-11-18 10:24:22 -08:00
committed by GitHub
parent a9ec5fc209
commit 1700cfb1c7

View File

@@ -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()