File tree Expand file tree Collapse file tree 1 file changed +6
-1
lines changed
src/main/java/com/arpnetworking/metrics/common/sources Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Original file line number Diff line number Diff line change @@ -150,8 +150,12 @@ private void requestReply(final RequestReply requestReply) {
150
150
// only created when pipelines are reloaded. To avoid recording values
151
151
// for dead pipelines this explicitly avoids recording zeroes.
152
152
final long samples = _receivedSamples .getAndSet (0 );
153
+ final long requests = _receivedRequests .getAndSet (0 );
153
154
if (samples > 0 ) {
154
- m .recordGauge (String .format ("sources/http/%s/metric_samples" , _metricSafeName ), samples );
155
+ m .recordCounter (String .format ("sources/http/%s/metric_samples" , _metricSafeName ), samples );
156
+ }
157
+ if (requests > 0 ) {
158
+ m .recordCounter (String .format ("sources/http/%s/requests" , _metricSafeName ), requests );
155
159
}
156
160
});
157
161
@@ -245,6 +249,7 @@ private List<Record> parseRecords(final com.arpnetworking.metrics.mad.model.Http
245
249
private final Materializer _materializer ;
246
250
private final Graph <FlowShape <HttpRequest , Record >, NotUsed > _processGraph ;
247
251
private final AtomicLong _receivedSamples = new AtomicLong (0 );
252
+ private final AtomicLong _receivedRequests = new AtomicLong (0 );
248
253
249
254
private static final StatisticFactory STATISTIC_FACTORY = new StatisticFactory ();
250
255
private static final Logger BAD_REQUEST_LOGGER =
You can’t perform that action at this time.
0 commit comments