@@ -113,7 +113,7 @@ func (d *DataDogReporter) Duration(request Request, blocked bool, errorOccurred
113
113
blockedTag := blockedKey + ":" + strconv .FormatBool (blocked )
114
114
errorTag := errorKey + ":" + strconv .FormatBool (errorOccurred )
115
115
tags := append ([]string {blockedTag , errorTag }, d .defaultTags ... )
116
- d .client .TimeInMilliseconds (durationMetricName , float64 ( duration / time . Millisecond ) , tags , 1 )
116
+ d .client .Timing (durationMetricName , duration , tags , 1 )
117
117
}
118
118
119
119
d .enqueue (f )
@@ -124,7 +124,7 @@ func (d *DataDogReporter) HandledWhitelist(request Request, whitelisted bool, er
124
124
whitelistedTag := whitelistedKey + ":" + strconv .FormatBool (whitelisted )
125
125
errorTag := errorKey + ":" + strconv .FormatBool (errorOccurred )
126
126
tags := append ([]string {whitelistedTag , errorTag }, d .defaultTags ... )
127
- d .client .TimeInMilliseconds (reqWhitelistMetricName , float64 ( duration / time . Millisecond ) , tags , 1.0 )
127
+ d .client .Timing (reqWhitelistMetricName , duration , tags , 1.0 )
128
128
}
129
129
d .enqueue (f )
130
130
}
@@ -134,7 +134,7 @@ func (d *DataDogReporter) HandledBlacklist(request Request, blacklisted bool, er
134
134
blacklistedTag := blacklistedKey + ":" + strconv .FormatBool (blacklisted )
135
135
errorTag := errorKey + ":" + strconv .FormatBool (errorOccurred )
136
136
tags := append ([]string {blacklistedTag , errorTag }, d .defaultTags ... )
137
- d .client .TimeInMilliseconds (reqBlacklistMetricName , float64 ( duration / time . Millisecond ) , tags , 1.0 )
137
+ d .client .Timing (reqBlacklistMetricName , duration , tags , 1.0 )
138
138
}
139
139
d .enqueue (f )
140
140
}
@@ -144,7 +144,7 @@ func (d *DataDogReporter) HandledRatelimit(request Request, ratelimited bool, er
144
144
ratelimitedTag := ratelimitedKey + ":" + strconv .FormatBool (ratelimited )
145
145
errorTag := errorKey + ":" + strconv .FormatBool (errorOccurred )
146
146
tags := append ([]string {ratelimitedTag , errorTag }, d .defaultTags ... )
147
- d .client .TimeInMilliseconds (reqRateLimitMetricName , float64 ( duration / time . Millisecond ) , tags , 1.0 )
147
+ d .client .Timing (reqRateLimitMetricName , duration , tags , 1.0 )
148
148
}
149
149
d .enqueue (f )
150
150
}
@@ -155,7 +155,7 @@ func (d *DataDogReporter) HandledRatelimitWithRoute(request Request, ratelimited
155
155
errorTag := errorKey + ":" + strconv .FormatBool (errorOccurred )
156
156
routeTag := routeKey + ":" + request .Path
157
157
tags := append ([]string {ratelimitedTag , errorTag , routeTag }, d .defaultTags ... )
158
- d .client .TimeInMilliseconds (reqRateLimitMetricName , float64 ( duration / time . Millisecond ) , tags , 1.0 )
158
+ d .client .Timing (reqRateLimitMetricName , duration , tags , 1.0 )
159
159
}
160
160
d .enqueue (f )
161
161
}
@@ -171,7 +171,7 @@ func (d *DataDogReporter) HandledJail(request Request, blocked bool, errorOccurr
171
171
blockedTag := blockedKey + ":" + strconv .FormatBool (blocked )
172
172
errorTag := errorKey + ":" + strconv .FormatBool (errorOccurred )
173
173
tags := append (tags , []string {blockedTag , errorTag }... )
174
- d .client .TimeInMilliseconds (reqJailMetricName , float64 ( duration / time . Millisecond ) , tags , 1.0 )
174
+ d .client .Timing (reqJailMetricName , duration , tags , 1.0 )
175
175
}
176
176
d .enqueue (f )
177
177
}
@@ -191,7 +191,7 @@ func (d *DataDogReporter) RedisCounterIncr(duration time.Duration, errorOccurred
191
191
f := func () {
192
192
errorTag := errorKey + ":" + strconv .FormatBool (errorOccurred )
193
193
tags := append ([]string {errorTag }, d .defaultTags ... )
194
- d .client .TimeInMilliseconds (redisCounterIncrMetricName , float64 ( duration / time . Millisecond ) , tags , 1.0 )
194
+ d .client .Timing (redisCounterIncrMetricName , duration , tags , 1.0 )
195
195
}
196
196
d .enqueue (f )
197
197
}
@@ -200,7 +200,7 @@ func (d *DataDogReporter) RedisCounterPruned(duration time.Duration, cacheSize f
200
200
f := func () {
201
201
d .client .Gauge (redisCounterCacheSizeMetricName , cacheSize , d .defaultTags , 1 )
202
202
d .client .Gauge (redisCounterPrunedMetricName , prunedCounted , d .defaultTags , 1 )
203
- d .client .TimeInMilliseconds (redisCounterPrunePassMetricName , float64 ( duration / time . Millisecond ) , d .defaultTags , 1 )
203
+ d .client .Timing (redisCounterPrunePassMetricName , duration , d .defaultTags , 1 )
204
204
}
205
205
d .enqueue (f )
206
206
}
0 commit comments