@ikonintegration/ikapi 3.1.0 → 3.1.1
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/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ikonintegration/ikapi",
|
|
3
|
-
"version": "3.1.
|
|
3
|
+
"version": "3.1.1",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"module": "main.js",
|
|
@@ -11,13 +11,13 @@
|
|
|
11
11
|
"author": "",
|
|
12
12
|
"license": "ISC",
|
|
13
13
|
"dependencies": {
|
|
14
|
-
"@aws-sdk/client-dynamodb": "^3.
|
|
15
|
-
"@aws-sdk/client-ses": "^3.
|
|
16
|
-
"@aws-sdk/client-sns": "^3.
|
|
17
|
-
"@aws-sdk/credential-provider-node": "^3.
|
|
18
|
-
"@aws-sdk/node-http-handler": "^3.
|
|
19
|
-
"@aws-sdk/util-dynamodb": "^3.
|
|
20
|
-
"@ikonintegration/mod-resources-tracker-client": "0.0.
|
|
14
|
+
"@aws-sdk/client-dynamodb": "^3.131.0",
|
|
15
|
+
"@aws-sdk/client-ses": "^3.131.0",
|
|
16
|
+
"@aws-sdk/client-sns": "^3.131.0",
|
|
17
|
+
"@aws-sdk/credential-provider-node": "^3.131.0",
|
|
18
|
+
"@aws-sdk/node-http-handler": "^3.127.0",
|
|
19
|
+
"@aws-sdk/util-dynamodb": "^3.131.0",
|
|
20
|
+
"@ikonintegration/mod-resources-tracker-client": "0.0.2",
|
|
21
21
|
"abind": "^1.0.5",
|
|
22
22
|
"bluebird": "^3.7.2",
|
|
23
23
|
"email-templates": "^8.0.8",
|
|
@@ -14,7 +14,10 @@ export default class IKExecutionTracker {
|
|
|
14
14
|
}
|
|
15
15
|
/* Public */
|
|
16
16
|
appendClaimer(value, key) { this.claimers[value] = key; }
|
|
17
|
-
appendEvent(event) {
|
|
17
|
+
appendEvent(event) {
|
|
18
|
+
event.concatToClaimers(this.claimers);
|
|
19
|
+
this.client.appendEvent(event);
|
|
20
|
+
}
|
|
18
21
|
//
|
|
19
22
|
async stopTracking() {
|
|
20
23
|
try {
|
|
@@ -36,9 +39,13 @@ export default class IKExecutionTracker {
|
|
|
36
39
|
const context = this._getECSMetadataObject();
|
|
37
40
|
if (context && context.containerInstanceArn) {
|
|
38
41
|
const extraDetails = { startTime: this.startedOn, endTime: Date.now(), taskConfig: { cpu: process.env.CPU, memory: process.env.MEMORY } };
|
|
39
|
-
|
|
42
|
+
const event = RTClient.newECSExecutionEvent(context.ecsTaskId, context.containerInstanceArn, extraDetails);
|
|
43
|
+
this.appendEvent(event);
|
|
40
44
|
}
|
|
41
|
-
} else
|
|
45
|
+
} else {
|
|
46
|
+
const event = RTClient.newLambdaInvocationEvent(this.context.awsRequestId);
|
|
47
|
+
this.appendEvent(event); //lambda logging
|
|
48
|
+
}
|
|
42
49
|
}
|
|
43
50
|
_collectDDBStats() {
|
|
44
51
|
const stats = this.db ? this.db.getTrackerStats() : null;
|