@netacea/kinesisingest 1.1.0 → 1.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +50 -0
- package/dist/Kinesis.d.ts +7 -2
- package/dist/Kinesis.js +14 -3
- package/dist/Kinesis.js.map +1 -1
- package/dist/KinesisIngest.d.ts +13 -14
- package/dist/KinesisIngest.js +47 -41
- package/dist/KinesisIngest.js.map +1 -1
- package/package.json +4 -4
- package/dist/SecretsManager.d.ts +0 -4
- package/dist/SecretsManager.js +0 -23
- package/dist/SecretsManager.js.map +0 -1
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,56 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
+
# [1.4.0](https://github.com/Netacea/JavascriptATAIntegration/compare/@netacea/kinesisingest@1.3.0...@netacea/kinesisingest@1.4.0) (2022-04-29)
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
### Features
|
|
10
|
+
|
|
11
|
+
* **Akamai:** ING-155: remove all .npmrc files ([07774ad](https://github.com/Netacea/JavascriptATAIntegration/commit/07774ad034a9a3076adae131cf784e1e22fea73e))
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
### Reverts
|
|
15
|
+
|
|
16
|
+
* Revert "ING-155 Update Kinesis signon to conform with new aws types" ([0a35593](https://github.com/Netacea/JavascriptATAIntegration/commit/0a3559352a9500fa74d7f3effdce49e82c551b62))
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
# [1.3.0](https://github.com/Netacea/JavascriptATAIntegration/compare/@netacea/kinesisingest@1.2.0...@netacea/kinesisingest@1.3.0) (2022-03-23)
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
### Features
|
|
26
|
+
|
|
27
|
+
* **akamai:** II-46: More WIP Signatures ([bf5f9af](https://github.com/Netacea/JavascriptATAIntegration/commit/bf5f9afc30d732434b0edfedce8c6abb1f738bf7))
|
|
28
|
+
* **akamai:** II-46: Replace setTimeout functionality in KinesisIngest ([8c19a7c](https://github.com/Netacea/JavascriptATAIntegration/commit/8c19a7c5bc1788ccd7805937533bcd6e0ddeb57f))
|
|
29
|
+
* **akamai:** II-46: Unwinding changes & batching ([a52c094](https://github.com/Netacea/JavascriptATAIntegration/commit/a52c094212c5b70c685f189e23c294961240f0fa))
|
|
30
|
+
* **akamai:** II-9: Fix linting errors ([a558a2d](https://github.com/Netacea/JavascriptATAIntegration/commit/a558a2d55e247202fe67f00228c8dc6fc2709a30))
|
|
31
|
+
* **akamai:** II-9: WIP on Crypto ([321f8a5](https://github.com/Netacea/JavascriptATAIntegration/commit/321f8a54d1f6a4b3ea3ba1840f46770110ab9530))
|
|
32
|
+
* **akamai:** II-9: WIP Past Crypto ([bf05943](https://github.com/Netacea/JavascriptATAIntegration/commit/bf059430cf522f0579c406ce92345d0a07f1dade))
|
|
33
|
+
* **integrations:** II-9: fix buffer polyfill ([a83c6d9](https://github.com/Netacea/JavascriptATAIntegration/commit/a83c6d98d77a3bcb9c0160b2e5e38320f48ea9c3))
|
|
34
|
+
|
|
35
|
+
|
|
36
|
+
|
|
37
|
+
|
|
38
|
+
|
|
39
|
+
# [1.2.0](https://github.com/Netacea/JavascriptATAIntegration/compare/@netacea/kinesisingest@1.1.0...@netacea/kinesisingest@1.2.0) (2021-08-04)
|
|
40
|
+
|
|
41
|
+
|
|
42
|
+
### Features
|
|
43
|
+
|
|
44
|
+
* **PB-1834:** Batched ingest ([b41a8c6](https://github.com/Netacea/JavascriptATAIntegration/commit/b41a8c6c26f7bf85c107a23bef24c75a82e6098b))
|
|
45
|
+
* **PB-1834:** Batched ingest using cloudfront fully working ([638b7e7](https://github.com/Netacea/JavascriptATAIntegration/commit/638b7e7e80888944c8bfaf7c2c4bae728eee1bd5))
|
|
46
|
+
* **PB-1834:** Batching kinesis logs ([4570ef5](https://github.com/Netacea/JavascriptATAIntegration/commit/4570ef5952bbc00da9140d60f017576a858926fd))
|
|
47
|
+
* **PB-1834:** Lint! ([ac095ef](https://github.com/Netacea/JavascriptATAIntegration/commit/ac095ef78cdcc7901a23921b3d1890d2ea2529c2))
|
|
48
|
+
* **PB-1834:** Passing batch size as a param ([5b80493](https://github.com/Netacea/JavascriptATAIntegration/commit/5b80493d50ffb30d38031d643bfd8e2bd27e3c8b))
|
|
49
|
+
* **PB-1834:** Removing only and skip and fixing tests ([ef5003f](https://github.com/Netacea/JavascriptATAIntegration/commit/ef5003f0499ea29c14b0dba880581b748f4e0905))
|
|
50
|
+
* **PB-1834:** Tests + remove secrets manager ([87a9b56](https://github.com/Netacea/JavascriptATAIntegration/commit/87a9b5692f30b5b58ba50eac40da1ce72e5ac778))
|
|
51
|
+
|
|
52
|
+
|
|
53
|
+
|
|
54
|
+
|
|
55
|
+
|
|
6
56
|
# 1.1.0 (2021-07-21)
|
|
7
57
|
|
|
8
58
|
|
package/dist/Kinesis.d.ts
CHANGED
|
@@ -4,8 +4,13 @@ export interface KinesisPayloadArgs {
|
|
|
4
4
|
streamName: string;
|
|
5
5
|
accessKeyId?: string;
|
|
6
6
|
secretAccessKey?: string;
|
|
7
|
-
|
|
7
|
+
}
|
|
8
|
+
interface KinesisRecord {
|
|
9
|
+
Data: string;
|
|
10
|
+
PartitionKey: string;
|
|
8
11
|
}
|
|
9
12
|
export default class Kinesis {
|
|
10
|
-
static
|
|
13
|
+
static batchArrayForKinesis(array: any[], size: number): KinesisRecord[];
|
|
14
|
+
static signRequest(kinesisOpts: KinesisPayloadArgs, webLog: KinesisIngestWebLog[], batchSize: number): SignedAwsRequest;
|
|
11
15
|
}
|
|
16
|
+
export {};
|
package/dist/Kinesis.js
CHANGED
|
@@ -3,10 +3,21 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
const aws4 = require("aws4");
|
|
4
4
|
const KinesisConstants_1 = require("./KinesisConstants");
|
|
5
5
|
class Kinesis {
|
|
6
|
-
static
|
|
6
|
+
static batchArrayForKinesis(array, size) {
|
|
7
|
+
const result = [];
|
|
8
|
+
for (let i = 0; i < array.length; i += size) {
|
|
9
|
+
const chunk = array.slice(i, i + size);
|
|
10
|
+
result.push({
|
|
11
|
+
Data: Buffer.from(JSON.stringify(chunk)).toString('base64'),
|
|
12
|
+
PartitionKey: Date.now().toString()
|
|
13
|
+
});
|
|
14
|
+
}
|
|
15
|
+
return result;
|
|
16
|
+
}
|
|
17
|
+
static signRequest(kinesisOpts, webLog, batchSize) {
|
|
7
18
|
const { accessKeyId, secretAccessKey } = kinesisOpts;
|
|
8
19
|
const params = {
|
|
9
|
-
|
|
20
|
+
Records: this.batchArrayForKinesis(webLog, batchSize),
|
|
10
21
|
PartitionKey: Date.now().toString(),
|
|
11
22
|
StreamName: kinesisOpts.streamName
|
|
12
23
|
};
|
|
@@ -15,7 +26,7 @@ class Kinesis {
|
|
|
15
26
|
body: JSON.stringify(params),
|
|
16
27
|
headers: {
|
|
17
28
|
'Content-Type': 'application/x-amz-json-1.1',
|
|
18
|
-
'X-Amz-Target': 'Kinesis_20131202.
|
|
29
|
+
'X-Amz-Target': 'Kinesis_20131202.PutRecords'
|
|
19
30
|
},
|
|
20
31
|
region: KinesisConstants_1.REGION
|
|
21
32
|
}, {
|
package/dist/Kinesis.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Kinesis.js","sourceRoot":"","sources":["../src/Kinesis.ts"],"names":[],"mappings":";;AAAA,6BAA4B;AAG5B,yDAA2C;
|
|
1
|
+
{"version":3,"file":"Kinesis.js","sourceRoot":"","sources":["../src/Kinesis.ts"],"names":[],"mappings":";;AAAA,6BAA4B;AAG5B,yDAA2C;AAY3C,MAAqB,OAAO;IACnB,MAAM,CAAC,oBAAoB,CAAE,KAAY,EAAE,IAAY;QAC5D,MAAM,MAAM,GAAoB,EAAE,CAAA;QAClC,KAAK,IAAI,CAAC,GAAG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
2
|
headers: {
|
|
3
3
|
[key: string]: string;
|
|
4
4
|
};
|
|
@@ -14,22 +14,21 @@ export interface KinesisIngestConfigArgs {
|
|
|
14
14
|
kinesisStreamName: string;
|
|
15
15
|
kinesisAccessKey?: string;
|
|
16
16
|
kinesisSecretKey?: string;
|
|
17
|
-
|
|
17
|
+
logBatchSize?: number;
|
|
18
|
+
maxLogAgeSeconds?: number;
|
|
18
19
|
}
|
|
19
20
|
export interface KinesisIngestArgs extends KinesisIngestConfigArgs {
|
|
20
21
|
apiKey: string;
|
|
21
22
|
}
|
|
22
23
|
export default class KinesisIngest {
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
}, MakeRequest extends KinesisMakeRequest>(log: LogFormat, makeRequest: MakeRequest): Promise<any>;
|
|
24
|
+
protected readonly kinesisStreamName: string;
|
|
25
|
+
protected readonly kinesisAccessKey?: string;
|
|
26
|
+
protected readonly kinesisSecretKey?: string;
|
|
27
|
+
protected readonly logBatchSize: number;
|
|
28
|
+
protected readonly maxLogAgeSeconds: number;
|
|
29
|
+
protected logCache: KinesisIngestWebLog[];
|
|
30
|
+
private intervalSet;
|
|
31
|
+
constructor({ kinesisStreamName, kinesisAccessKey, kinesisSecretKey, maxLogAgeSeconds, logBatchSize }: KinesisIngestArgs);
|
|
32
|
+
putToKinesis<MakeRequest extends KinesisMakeRequest>(makeRequest: MakeRequest): Promise<void>;
|
|
33
|
+
ingest<LogFormat extends KinesisIngestWebLog, MakeRequest extends KinesisMakeRequest>(log: LogFormat, makeRequest: MakeRequest): Promise<any>;
|
|
34
34
|
}
|
|
35
|
-
export {};
|
package/dist/KinesisIngest.js
CHANGED
|
@@ -1,60 +1,66 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
const Kinesis_1 = require("./Kinesis");
|
|
4
|
-
|
|
4
|
+
async function sleep(ms) {
|
|
5
|
+
return await new Promise(resolve => {
|
|
6
|
+
setTimeout(resolve, ms);
|
|
7
|
+
});
|
|
8
|
+
}
|
|
5
9
|
class KinesisIngest {
|
|
6
|
-
constructor({ kinesisStreamName, kinesisAccessKey, kinesisSecretKey,
|
|
10
|
+
constructor({ kinesisStreamName, kinesisAccessKey, kinesisSecretKey, maxLogAgeSeconds, logBatchSize }) {
|
|
11
|
+
this.logBatchSize = 20;
|
|
12
|
+
this.maxLogAgeSeconds = 10;
|
|
13
|
+
this.logCache = [];
|
|
14
|
+
this.intervalSet = false;
|
|
7
15
|
this.kinesisStreamName = kinesisStreamName;
|
|
8
16
|
this.kinesisAccessKey = kinesisAccessKey;
|
|
9
17
|
this.kinesisSecretKey = kinesisSecretKey;
|
|
10
|
-
|
|
11
|
-
|
|
18
|
+
if (maxLogAgeSeconds !== undefined &&
|
|
19
|
+
maxLogAgeSeconds < this.maxLogAgeSeconds &&
|
|
20
|
+
maxLogAgeSeconds > 0) {
|
|
21
|
+
this.maxLogAgeSeconds = maxLogAgeSeconds;
|
|
22
|
+
}
|
|
23
|
+
if (logBatchSize !== undefined) {
|
|
24
|
+
this.logBatchSize = logBatchSize;
|
|
25
|
+
}
|
|
12
26
|
}
|
|
13
|
-
async
|
|
14
|
-
if (this.
|
|
27
|
+
async putToKinesis(makeRequest) {
|
|
28
|
+
if (this.logCache.length === 0) {
|
|
15
29
|
return;
|
|
16
30
|
}
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
}
|
|
20
|
-
const data = SecretsManager_1.default.signRequest(this.secretsManagerSecretId);
|
|
21
|
-
const response = await makeRequest({
|
|
22
|
-
headers: data.headers,
|
|
23
|
-
host: `https://${data.hostname}`,
|
|
24
|
-
method: data.method,
|
|
25
|
-
path: data.path,
|
|
26
|
-
body: data.body
|
|
27
|
-
});
|
|
31
|
+
const localCache = [...this.logCache];
|
|
32
|
+
this.logCache = [];
|
|
28
33
|
try {
|
|
29
|
-
const
|
|
30
|
-
|
|
31
|
-
|
|
34
|
+
const data = Kinesis_1.default.signRequest({
|
|
35
|
+
streamName: this.kinesisStreamName,
|
|
36
|
+
accessKeyId: this.kinesisAccessKey,
|
|
37
|
+
secretAccessKey: this.kinesisSecretKey
|
|
38
|
+
}, localCache, this.logBatchSize);
|
|
39
|
+
await makeRequest({
|
|
40
|
+
headers: data.headers,
|
|
41
|
+
host: `https://${data.hostname}`,
|
|
42
|
+
method: data.method,
|
|
43
|
+
path: data.path,
|
|
44
|
+
body: data.body
|
|
45
|
+
});
|
|
32
46
|
}
|
|
33
47
|
catch (e) {
|
|
34
|
-
|
|
35
|
-
|
|
48
|
+
this.logCache.push(...localCache);
|
|
49
|
+
// eslint-disable-next-line no-console
|
|
50
|
+
console.error(e);
|
|
36
51
|
}
|
|
37
52
|
}
|
|
38
53
|
async ingest(log, makeRequest) {
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
apiKey: this.apiKey
|
|
50
|
-
});
|
|
51
|
-
return await makeRequest({
|
|
52
|
-
headers: data.headers,
|
|
53
|
-
host: `https://${data.hostname}`,
|
|
54
|
-
method: data.method,
|
|
55
|
-
path: data.path,
|
|
56
|
-
body: data.body
|
|
57
|
-
});
|
|
54
|
+
this.logCache.push(log);
|
|
55
|
+
if (!this.intervalSet) {
|
|
56
|
+
this.intervalSet = true;
|
|
57
|
+
await sleep(this.maxLogAgeSeconds * 1000);
|
|
58
|
+
await this.putToKinesis(makeRequest);
|
|
59
|
+
this.intervalSet = false;
|
|
60
|
+
}
|
|
61
|
+
if (this.logCache.length >= this.logBatchSize) {
|
|
62
|
+
return await this.putToKinesis(makeRequest);
|
|
63
|
+
}
|
|
58
64
|
}
|
|
59
65
|
}
|
|
60
66
|
exports.default = KinesisIngest;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"KinesisIngest.js","sourceRoot":"","sources":["../src/KinesisIngest.ts"],"names":[],"mappings":";;AAAA,uCAA+B;
|
|
1
|
+
{"version":3,"file":"KinesisIngest.js","sourceRoot":"","sources":["../src/KinesisIngest.ts"],"names":[],"mappings":";;AAAA,uCAA+B;AAkB/B,KAAK,UAAU,KAAK,CAAE,EAAU;IAC9B,OAAO,MAAM,IAAI,OAAO,CAAC,OAAO,CAAC,EAAE;QACjC,UAAU,CAAC,OAAO,EAAE,EAAE,CAAC,CAAA;IACzB,CAAC,CAAC,CAAA;AACJ,CAAC;AAKD,MAAqB,aAAa;IAShC,YAAa,EACX,iBAAiB,EACjB,gBAAgB,EAChB,gBAAgB,EAChB,gBAAgB,EAChB,YAAY,EACM;QAXD,iBAAY,GAAW,EAAE,CAAA;QACzB,qBAAgB,GAAW,EAAE,CAAA;QACtC,aAAQ,GAA0B,EAAE,CAAA;QACtC,gBAAW,GAAY,KAAK,CAAA;QASlC,IAAI,CAAC,iBAAiB,GAAG,iBAAiB,CAAA;QAC1C,IAAI,CAAC,gBAAgB,GAAG,gBAAgB,CAAA;QACxC,IAAI,CAAC,gBAAgB,GAAG,gBAAgB,CAAA;QACxC,IACE,gBAAgB,KAAK,SAAS;YAC9B,gBAAgB,GAAG,IAAI,CAAC,gBAAgB;YACxC,gBAAgB,GAAG,CAAC,EACpB;YACA,IAAI,CAAC,gBAAgB,GAAG,gBAAgB,CAAA;SACzC;QACD,IAAI,YAAY,KAAK,SAAS,EAAE;YAC9B,IAAI,CAAC,YAAY,GAAG,YAAY,CAAA;SACjC;IACH,CAAC;IAEM,KAAK,CAAC,YAAY,CAA0C,WAAwB;QACzF,IAAI,IAAI,CAAC,QAAQ,CAAC,MAAM,KAAK,CAAC,EAAE;YAC9B,OAAM;SACP;QACD,MAAM,UAAU,GAAG,CAAC,GAAG,IAAI,CAAC,QAAQ,CAAC,CAAA;QACrC,IAAI,CAAC,QAAQ,GAAG,EAAE,CAAA;QAClB,I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|
{
|
|
2
2
|
"name": "@netacea/kinesisingest",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.4.0",
|
|
4
4
|
"description": "Kinesis Ingest module for Netacea.",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
},
|
|
16
16
|
"license": "ISC",
|
|
17
17
|
"devDependencies": {
|
|
18
|
-
"@types/aws4": "
|
|
18
|
+
"@types/aws4": "1.5.2",
|
|
19
19
|
"@types/sinon": "^9.0.7",
|
|
20
20
|
"@types/tape": "^4.13.0",
|
|
21
21
|
"eslint": "^6.8.0",
|
|
@@ -27,7 +27,7 @@
|
|
|
27
27
|
"typescript": "^3.9.7"
|
|
28
28
|
},
|
|
29
29
|
"dependencies": {
|
|
30
|
-
"aws4": "
|
|
30
|
+
"aws4": "1.11.0"
|
|
31
31
|
},
|
|
32
|
-
"gitHead": "
|
|
32
|
+
"gitHead": "199ab99c6cfb464e5dc9008566629b87dac2a919"
|
|
33
33
|
}
|
package/dist/SecretsManager.d.ts
DELETED
package/dist/SecretsManager.js
DELETED
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
const aws4 = require("aws4");
|
|
4
|
-
const KinesisConstants_1 = require("./KinesisConstants");
|
|
5
|
-
class SecretsManager {
|
|
6
|
-
static signRequest(secretsManagerSecretId) {
|
|
7
|
-
const params = {
|
|
8
|
-
SecretId: secretsManagerSecretId
|
|
9
|
-
};
|
|
10
|
-
const signedRequest = aws4.sign({
|
|
11
|
-
service: 'secretsmanager',
|
|
12
|
-
body: JSON.stringify(params),
|
|
13
|
-
headers: {
|
|
14
|
-
'Content-Type': 'application/x-amz-json-1.1',
|
|
15
|
-
'X-Amz-Target': 'secretsmanager.GetSecretValue'
|
|
16
|
-
},
|
|
17
|
-
region: KinesisConstants_1.REGION
|
|
18
|
-
});
|
|
19
|
-
return signedRequest;
|
|
20
|
-
}
|
|
21
|
-
}
|
|
22
|
-
exports.default = SecretsManager;
|
|
23
|
-
//# sourceMappingURL=SecretsManager.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"SecretsManager.js","sourceRoot":"","sources":["../src/SecretsManager.ts"],"names":[],"mappings":";;AAAA,6BAA4B;AAC5B,yDAA2C;AAG3C,MAAqB,cAAc;IAC1B,MAAM,CAAC,WAAW,CAAE,sBAA8B;QACvD,MAAM,MAAM,GAAG;YACb,QAAQ,EAAE,sBAAsB;SACjC,CAAA;QACD,MAAM,aAAa,GAAG,IAAI,CAAC,IAAI,CAAC;YAC9B,OAAO,EAAE,gBAAgB;YACzB,IAAI,EAAE,IAAI,CAAC,SAAS,CAAC,MAAM,CAAC;YAC5B,OAAO,EAAE;gBACP,cAAc,EAAE,4BAA4B;gBAC5C,cAAc,EAAE,+BAA+B;aAChD;YACD,MAAM,EAAE,yBAAM;SACf,CAAC,CAAA;QACF,OAAO,aAAa,CAAA;IACtB,CAAC;CACF;AAhBD,iCAgBC"}
|