diff --git a/component/loki/source/docker/docker.go b/component/loki/source/docker/docker.go index 53a25b85da47..4ea45dbea449 100644 --- a/component/loki/source/docker/docker.go +++ b/component/loki/source/docker/docker.go @@ -242,11 +242,11 @@ func (c *Component) Update(args component.Arguments) error { return err } targets = append(targets, tgt) - - // This will never fail because it only fails if the context gets canceled. - _ = c.manager.syncTargets(context.Background(), targets) } + // This will never fail because it only fails if the context gets canceled. + _ = c.manager.syncTargets(context.Background(), targets) + c.args = newArgs return nil }