Use nanosecond precision in docker_log input (#6663)
This commit is contained in:
parent
a9ec5fc209
commit
1700cfb1c7
|
@ -203,6 +203,7 @@ func (d *DockerLogs) matchedContainerName(names []string) string {
|
||||||
|
|
||||||
func (d *DockerLogs) Gather(acc telegraf.Accumulator) error {
|
func (d *DockerLogs) Gather(acc telegraf.Accumulator) error {
|
||||||
ctx := context.Background()
|
ctx := context.Background()
|
||||||
|
acc.SetPrecision(time.Nanosecond)
|
||||||
|
|
||||||
ctx, cancel := context.WithTimeout(ctx, d.Timeout.Duration)
|
ctx, cancel := context.WithTimeout(ctx, d.Timeout.Duration)
|
||||||
defer cancel()
|
defer cancel()
|
||||||
|
|
Loading…
Reference in New Issue