@@ -31,3 +31,29 @@ func StatsdRunTime(start time.Time, exec string, watchType string, watchId strin
31
31
statsd .Gauge (metricName , float64 (milliseconds ), tags )
32
32
}
33
33
}
34
+
35
+ func StatsdDuplicate (watchType string , watchId string ) {
36
+ if DogStatsd {
37
+ statsd , _ := godspeed .NewDefault ()
38
+ defer statsd .Conn .Close ()
39
+ tags := make ([]string , 2 )
40
+ watchTypeTag := fmt .Sprintf ("watchtype:%s" , watchType )
41
+ watchIdTag := fmt .Sprintf ("watchid:%s" , watchId )
42
+ tags = append (tags , watchTypeTag )
43
+ tags = append (tags , watchIdTag )
44
+ metricName := fmt .Sprintf ("%s.duplicate" , MetricPrefix )
45
+ statsd .Incr (metricName , tags )
46
+ }
47
+ }
48
+
49
+ func StatsdBlank (watchType string ) {
50
+ if DogStatsd {
51
+ statsd , _ := godspeed .NewDefault ()
52
+ defer statsd .Conn .Close ()
53
+ tags := make ([]string , 1 )
54
+ watchTypeTag := fmt .Sprintf ("watchtype:%s" , watchType )
55
+ tags = append (tags , watchTypeTag )
56
+ metricName := fmt .Sprintf ("%s.blank" , MetricPrefix )
57
+ statsd .Incr (metricName , tags )
58
+ }
59
+ }
0 commit comments