chore(inputs.vsphere): Improve metric collection error logging (#16572)

This commit is contained in:
Dane Strandboge 2025-03-04 03:37:59 -06:00 committed by GitHub
parent 9df54ae8ad
commit b6260ee49c
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 1 additions and 1 deletions

View File

@ -1156,7 +1156,7 @@ func (e *endpoint) collectResource(ctx context.Context, resourceType string, acc
n, localLatest, err := e.collectChunk(ctx, chunk, res, acc, estInterval)
e.log.Debugf("CollectChunk for %s returned %d metrics", resourceType, n)
if err != nil {
acc.AddError(errors.New("while collecting " + res.name + ": " + err.Error()))
acc.AddError(errors.New("while collecting " + res.name + " for vcenter " + e.url.Host + ": " + err.Error()))
return
}
e.parent.Log.Debugf("CollectChunk for %s returned %d metrics", resourceType, n)