Skip to content
This repository has been archived by the owner on Feb 18, 2021. It is now read-only.

Commit

Permalink
replicator:only update per dest counters if the msg type is MESSAGE
Browse files Browse the repository at this point in the history
  • Loading branch information
datoug committed Jul 19, 2017
1 parent 901e092 commit 3adc3a0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion services/replicator/inconn.go
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@ func (conn *inConnection) writeMsgsStream() {

// Update per destination metrics after msg is sent to local store (call is OpenReplicationRemoteRead)
// so they're most accurate.
if conn.metricsScope == metrics.OpenReplicationRemoteReadScope {
if conn.metricsScope == metrics.OpenReplicationRemoteReadScope && msg.GetType() == store.ReadMessageContentType_MESSAGE {
conn.destM3Client.IncCounter(conn.perDestMetricsScope, metrics.ReplicatorInConnPerDestMsgWritten)
latency := time.Duration(time.Now().UnixNano() - msg.GetMessage().Message.GetEnqueueTimeUtc())
conn.destM3Client.RecordTimer(conn.perDestMetricsScope, metrics.ReplicatorInConnPerDestMsgLatency, latency)
Expand Down

0 comments on commit 3adc3a0

Please sign in to comment.