Skip to content

Commit

Permalink
use current time on metrics register
Browse files Browse the repository at this point in the history
  • Loading branch information
luissimas committed Dec 11, 2023
1 parent 4e5b9c2 commit 1bd17ab
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions diameter.go
Original file line number Diff line number Diff line change
Expand Up @@ -187,8 +187,8 @@ func (c *DiameterClient) Send(msg *DiameterMessage) (*DiameterMessage, error) {
"cmd_code": strconv.FormatUint(uint64(msg.diamMsg.Header.CommandCode), 10),
}
now := time.Now()
c.reportMetric(c.metrics.RequestDuration, time.Now(), metrics.D(now.Sub(sentAt)), tags)
c.reportMetric(c.metrics.RequestCount, time.Now(), 1, tags)
c.reportMetric(c.metrics.RequestDuration, now, metrics.D(now.Sub(sentAt)), tags)
c.reportMetric(c.metrics.RequestCount, now, 1, tags)

delete(c.hopIds, hopByHopID)

Expand Down

0 comments on commit 1bd17ab

Please sign in to comment.