Skip to content

Commit

Permalink
Mark usage source in logs (#924)
Browse files Browse the repository at this point in the history
  • Loading branch information
attiasas authored Sep 12, 2023
1 parent 36ab1fb commit c3f0b35
Showing 1 changed file with 15 additions and 6 deletions.
21 changes: 15 additions & 6 deletions utils/usage/usage.go
Original file line number Diff line number Diff line change
Expand Up @@ -86,18 +86,27 @@ func (ur *UsageReporter) Report(features ...ReportFeature) {
}
log.Debug(ReportUsagePrefix, "Sending info...")
if ur.sendToEcosystem {
ur.reportWaitGroup.Go(func() error {
return ur.reportToEcosystem(features...)
ur.reportWaitGroup.Go(func() (err error) {
if err = ur.reportToEcosystem(features...); err != nil {
err = fmt.Errorf("ecosystem, %s", err.Error())
}
return
})
}
if ur.sendToXray {
ur.reportWaitGroup.Go(func() error {
return ur.reportToXray(features...)
ur.reportWaitGroup.Go(func() (err error) {
if err = ur.reportToXray(features...); err != nil {
err = fmt.Errorf("xray, %s", err.Error())
}
return
})
}
if ur.sendToArtifactory {
ur.reportWaitGroup.Go(func() error {
return ur.reportToArtifactory(features...)
ur.reportWaitGroup.Go(func() (err error) {
if err = ur.reportToArtifactory(features...); err != nil {
err = fmt.Errorf("artifactory, %s", err.Error())
}
return
})
}
}
Expand Down

0 comments on commit c3f0b35

Please sign in to comment.