diff --git a/cmd/development/kinesis-tap/substation/README.md b/cmd/development/kinesis-tap/substation/README.md index e96ca0ce..bd33d8c8 100644 --- a/cmd/development/kinesis-tap/substation/README.md +++ b/cmd/development/kinesis-tap/substation/README.md @@ -39,9 +39,12 @@ DEBU[0004] Flushed Substation pipeline. ## Build +Download, configure, and build the `kinesis-tap` binary with these commands: + ``` -git clone github.com/brexhq/substation && \ +git clone https://github.com/brexhq/substation.git && \ cd substation/cmd/development/kinesis-tap/substation && \ +jsonnet config.jsonnet > config.json && \ go build . ``` diff --git a/cmd/development/kinesis-tap/substation/config.jsonnet b/cmd/development/kinesis-tap/substation/config.jsonnet index 198853b4..368392a0 100644 --- a/cmd/development/kinesis-tap/substation/config.jsonnet +++ b/cmd/development/kinesis-tap/substation/config.jsonnet @@ -3,5 +3,5 @@ local sub = import '../../../../build/config/substation.libsonnet'; { transforms: [ sub.tf.send.stdout(), - ] + ], } diff --git a/examples/config/transform/send/aws_s3_glacier/config.jsonnet b/examples/config/transform/send/aws_s3_glacier/config.jsonnet index 76667c8e..4133b405 100644 --- a/examples/config/transform/send/aws_s3_glacier/config.jsonnet +++ b/examples/config/transform/send/aws_s3_glacier/config.jsonnet @@ -9,7 +9,7 @@ local sub = import '../../../../../build/config/substation.libsonnet'; transforms: [ sub.tf.send.aws.s3({ // Glacier Instant Retrieval charges a minimum of 128KB per object, otherwise - // the other values are set to impossibly high values to ensure all events are + // the other values are set to impossibly high values to ensure all events are // written to the same file. batch: { size: 128 * 1000, count: 1000 * 1000, duration: '60m' }, bucket_name: 'substation', diff --git a/examples/config/transform/utility/message_bytes/config.jsonnet b/examples/config/transform/utility/message_bytes/config.jsonnet index da8604ba..a2cdff2c 100644 --- a/examples/config/transform/utility/message_bytes/config.jsonnet +++ b/examples/config/transform/utility/message_bytes/config.jsonnet @@ -10,8 +10,8 @@ local dest = { type: 'aws_cloudwatch_embedded_metrics' }; // If the transform is configured first, then the metric reflects // the sum of bytes received by Substation. sub.transform.utility.metric.bytes({ metric: { name: 'BytesReceived', attributes: attr, destination: dest } }), - // This inserts a value into the object so that the message size increases. - sub.transform.object.insert({obj: {target_key: '_'}, value: 1}), + // This inserts a value into the object so that the message size increases. + sub.transform.object.insert({ obj: { target_key: '_' }, value: 1 }), // If the transform is configured last, then the metric reflects // the sum of bytes transformed by Substation. sub.transform.utility.metric.bytes({ metric: { name: 'BytesTransformed', attributes: attr, destination: dest } }), diff --git a/examples/config/transform/utility/message_freshness/config.jsonnet b/examples/config/transform/utility/message_freshness/config.jsonnet index 09314459..3ce8c5f5 100644 --- a/examples/config/transform/utility/message_freshness/config.jsonnet +++ b/examples/config/transform/utility/message_freshness/config.jsonnet @@ -5,7 +5,7 @@ // time and determining if the difference is less than a threshold: // - Success: current time - timestamp < threshold // - Failure: current time - timestamp >= threshold -// +// // The transform emits two metrics that describe success and failure, annotated // in the `FreshnessType` attribute. local sub = import '../../../../../build/config/substation.libsonnet'; @@ -15,10 +15,10 @@ local dest = { type: 'aws_cloudwatch_embedded_metrics' }; { transforms: [ - sub.transform.utility.metric.freshness({ + sub.transform.utility.metric.freshness({ threshold: '5s', // Amount of time spent in the system before considered stale. object: { source_key: 'timestamp' }, // Used as the reference to determine freshness. - metric: { name: 'MessageFreshness', attributes: attr, destination: dest } + metric: { name: 'MessageFreshness', attributes: attr, destination: dest }, }), ], }