Merge pull request #2139 from himanshug/emit_query_node_bytes

emit query/node/bytes metric
This commit is contained in:
Charles Allen 2015-12-22 08:07:04 -08:00
commit 7e64d5179f
2 changed files with 2 additions and 0 deletions

View File

@ -30,6 +30,7 @@ Available Metrics
|------|-----------|----------|------------|
|`query/time`|Milliseconds taken to complete a query.|Common: dataSource, type, interval, hasFilters, duration, context, remoteAddress, id. Aggregation Queries: numMetrics, numComplexMetrics. GroupBy: numDimensions. TopN: threshold, dimension.|< 1s|
|`query/node/time`|Milliseconds taken to query individual historical/realtime nodes.|id, status, server.|< 1s|
|`query/node/bytes`|bytes returned from querying individual historical/realtime nodes.|id, status, server.| |
|`query/node/ttfb`|Time to first byte. Milliseconds elapsed until broker starts receiving the response from individual historical/realtime nodes.|id, status, server.|< 1s|
|`query/intervalChunk/time`|Only emitted if interval chunking is enabled. Milliseconds required to query an interval chunk.|id, status, chunkInterval (if interval chunking is enabled).|< 1s|

View File

@ -278,6 +278,7 @@ public class DirectDruidClient<T> implements QueryRunner<T>
byteCount.get() / (0.0001 * (stopTime - responseStartTime))
);
emitter.emit(builder.build("query/node/time", stopTime - requestStartTime));
emitter.emit(builder.build("query/node/bytes", byteCount.get()));
synchronized (done) {
try {
// An empty byte array is put at the end to give the SequenceInputStream.close() as something to close out