Skip to content
This repository has been archived by the owner on Apr 17, 2024. It is now read-only.

Commit

Permalink
Revert "Revert "Add bucketed metrics and kinesis configuration to sen…
Browse files Browse the repository at this point in the history
…d logs to kibana""
  • Loading branch information
dafortune committed Oct 17, 2018
1 parent c62188f commit dd6a4af
Show file tree
Hide file tree
Showing 6 changed files with 612 additions and 20 deletions.
27 changes: 27 additions & 0 deletions conf/config.schema.js
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,33 @@ module.exports = {
log_file: {
description: 'log to a file instead of stdout'
},
log_to_kinesis: {
type: 'string',
description: 'stream name to log to kinesis'
},
log_to_kinesis_level: {
enum: ['fatal', 'error', 'warn', 'info', 'debug', 'trace'],
description: 'the verbosity of the logs to kinesis, keep in mind that this is a rate limiting system. WARN: setting it too verbose may hurt Kibana',
},
aws_kinesis_region: {
type: 'string',
description: 'the region for the Kinesis stream to send logs'
},
error_reporter_url: {
type: 'string',
description: 'the url to report errors (e.g. sentry)'
},
node_env: {
type: 'string',
description: 'node environment (e.g. production or development)'
},
latency_buckets: {
type: 'array',
items: {
type: 'integer'
}
},

buckets: {
type: 'object',
description: 'The configuration for all bucket types',
Expand Down
2 changes: 2 additions & 0 deletions lib/pipeline/RequestDecoder.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ class RequestDecoder extends Transform {

_transform(chunk, encoding, callback) {
const decoded = Protocol.Request.decode(chunk);
decoded.startTs = Date.now();

callback(null, decoded);
}
}
Expand Down
Loading

0 comments on commit dd6a4af

Please sign in to comment.