Skip to content

Commit

Permalink
APIGOV-19486 - update log lines (#151)
Browse files Browse the repository at this point in the history
  • Loading branch information
jcollins-axway authored Jun 29, 2021
1 parent 1387748 commit c657e52
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pkg/transaction/metric/metricscollector.go
Original file line number Diff line number Diff line change
Expand Up @@ -263,13 +263,12 @@ func (c *collector) generateLighthouseUsageEvent(transactionCount metrics.Counte
},
Meta: make(map[string]interface{}),
}
log.Infof("Creating usage event with %d transactions", transactionCount.Count())
log.Infof("Creating usage event with %d transactions [start timestamp: %d, end timestamp: %d]", transactionCount.Count(), util.ConvertTimeToMillis(c.startTime), util.ConvertTimeToMillis(c.endTime))
queueItem := &usageEventQueueItem{
event: lightHouseUsageEvent,
metric: transactionCount,
}
c.publishItemQueue = append(c.publishItemQueue, queueItem)
log.Infof("Published usage report [start timestamp: %d, end timestamp: %d]", util.ConvertTimeToMillis(c.startTime), util.ConvertTimeToMillis(c.endTime))
}

// func (c *collector) processTransactionMetric(metricName string, metric interface{}) {
Expand Down Expand Up @@ -350,6 +349,7 @@ func (c *collector) publishEvents() {
if err != nil {
log.Errorf("Failed to publish usage event [start timestamp: %d, end timestamp: %d]: %s - current usage report is kept and will be added to the next trigger interval. ", util.ConvertTimeToMillis(c.startTime), util.ConvertTimeToMillis(c.endTime), err.Error())
} else {
log.Infof("Published usage report [start timestamp: %d, end timestamp: %d]", util.ConvertTimeToMillis(c.startTime), util.ConvertTimeToMillis(c.endTime))
c.cleanupCounters(eventQueueItem)
}
}
Expand Down

0 comments on commit c657e52

Please sign in to comment.