@nicollasfrazao/liguelead-log-service 1.2.12 → 1.2.14
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.
|
@@ -8,7 +8,6 @@ import { LogType } from '../types/log.type';
|
|
|
8
8
|
*
|
|
9
9
|
* @property {FirehoseClient} firehose
|
|
10
10
|
* @property {LogStorageExternalS3ServiceConfigInterface} config
|
|
11
|
-
* @property {Map<string, Promise<void>>} writeQueue
|
|
12
11
|
* @property {Promise<any> | null} credentialsCache
|
|
13
12
|
*/
|
|
14
13
|
export declare class LogStorageExternalS3Service extends LogStorageExternalService {
|
|
@@ -20,22 +19,10 @@ export declare class LogStorageExternalS3Service extends LogStorageExternalServi
|
|
|
20
19
|
* @var {LogStorageExternalS3ServiceConfigInterface}
|
|
21
20
|
*/
|
|
22
21
|
private config;
|
|
23
|
-
/**
|
|
24
|
-
* @var {Map<string, Promise<void>>}
|
|
25
|
-
*/
|
|
26
|
-
private writeQueue;
|
|
27
22
|
/**
|
|
28
23
|
* @var {Promise<any> | null}
|
|
29
24
|
*/
|
|
30
25
|
private credentialsCache;
|
|
31
|
-
/**
|
|
32
|
-
* @var {number}
|
|
33
|
-
*/
|
|
34
|
-
private readonly maxRetries;
|
|
35
|
-
/**
|
|
36
|
-
* @var {number}
|
|
37
|
-
*/
|
|
38
|
-
private readonly baseDelay;
|
|
39
26
|
/**
|
|
40
27
|
* Constructor of the LogStorageS3Service
|
|
41
28
|
*
|
|
@@ -60,41 +47,6 @@ export declare class LogStorageExternalS3Service extends LogStorageExternalServi
|
|
|
60
47
|
* @returns {Promise<any>} Fresh credentials object for AWS SDK
|
|
61
48
|
*/
|
|
62
49
|
private refreshAssumeRoleCredentials;
|
|
63
|
-
/**
|
|
64
|
-
* Sleep for specified milliseconds
|
|
65
|
-
*
|
|
66
|
-
* @param {number} ms - Milliseconds to sleep
|
|
67
|
-
*
|
|
68
|
-
* @returns {Promise<void>}
|
|
69
|
-
*/
|
|
70
|
-
private sleep;
|
|
71
|
-
/**
|
|
72
|
-
* Execute operation with timeout
|
|
73
|
-
*
|
|
74
|
-
* @param {Function} operation - The operation to execute
|
|
75
|
-
* @param {number} timeoutMs - Timeout in milliseconds
|
|
76
|
-
*
|
|
77
|
-
* @returns {Promise<any>}
|
|
78
|
-
*/
|
|
79
|
-
private withTimeout;
|
|
80
|
-
/**
|
|
81
|
-
* Retry function with exponential backoff
|
|
82
|
-
*
|
|
83
|
-
* @param {Function} operation - The operation to retry
|
|
84
|
-
* @param {number} retries - Number of retries remaining
|
|
85
|
-
* @param {number} delay - Current delay in milliseconds
|
|
86
|
-
*
|
|
87
|
-
* @returns {Promise<any>}
|
|
88
|
-
*/
|
|
89
|
-
private retryWithBackoff;
|
|
90
|
-
/**
|
|
91
|
-
* Check if error is retryable
|
|
92
|
-
*
|
|
93
|
-
* @param {any} error - The error to check
|
|
94
|
-
*
|
|
95
|
-
* @returns {boolean}
|
|
96
|
-
*/
|
|
97
|
-
private isRetryableError;
|
|
98
50
|
/**
|
|
99
51
|
* Upload log content to Firehose (which delivers to S3)
|
|
100
52
|
*
|
|
@@ -105,8 +57,7 @@ export declare class LogStorageExternalS3Service extends LogStorageExternalServi
|
|
|
105
57
|
*/
|
|
106
58
|
private uploadLog;
|
|
107
59
|
/**
|
|
108
|
-
* Send log content to Firehose
|
|
109
|
-
* Firehose handles delivery to S3 with buffering and compression
|
|
60
|
+
* Send log content to Firehose
|
|
110
61
|
*
|
|
111
62
|
* @param {string} key The S3 key (path) for the log file (used for metadata)
|
|
112
63
|
* @param {LogType[]} data The new content to send
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"log.storage.external.s3.service.d.ts","sourceRoot":"","sources":["../../src/services/log.storage.external.s3.service.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,yBAAyB,EAAE,MAAM,gCAAgC,CAAC;AAE3E,OAAO,EAAE,yBAAyB,EAAE,MAAM,4CAA4C,CAAC;AAEvF,OAAO,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAC;AAI5C
|
|
1
|
+
{"version":3,"file":"log.storage.external.s3.service.d.ts","sourceRoot":"","sources":["../../src/services/log.storage.external.s3.service.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,yBAAyB,EAAE,MAAM,gCAAgC,CAAC;AAE3E,OAAO,EAAE,yBAAyB,EAAE,MAAM,4CAA4C,CAAC;AAEvF,OAAO,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAC;AAI5C;;;;;;;;GAQG;AACH,qBAAa,2BAA4B,SAAQ,yBAAyB;IAExE;;OAEG;IACH,OAAO,CAAC,QAAQ,CAAiB;IAEjC;;OAEG;IACH,OAAO,CAAC,MAAM,CAA6C;IAE3D;;OAEG;IACH,OAAO,CAAC,gBAAgB,CAA6B;IAErD;;;;OAIG;gBACU,gBAAgB,EAAE,yBAAyB;IAgCxD;;;;OAIG;IACI,SAAS,IAAI,OAAO;IAK3B;;;;OAIG;YACW,wBAAwB;IAqCtC;;;;OAIG;YACW,4BAA4B;IA8C1C;;;;;;;OAOG;YACW,SAAS;IA8CvB;;;;;;;OAOG;YACW,SAAS;IAyBvB;;;;;;OAMG;IACU,KAAK,CAAC,IAAI,EAAE,OAAO,EAAE,GAAG,OAAO,CAAC,IAAI,CAAC;CA6CnD"}
|
|
@@ -14,7 +14,6 @@ const log_error_1 = require("../errors/log.error");
|
|
|
14
14
|
*
|
|
15
15
|
* @property {FirehoseClient} firehose
|
|
16
16
|
* @property {LogStorageExternalS3ServiceConfigInterface} config
|
|
17
|
-
* @property {Map<string, Promise<void>>} writeQueue
|
|
18
17
|
* @property {Promise<any> | null} credentialsCache
|
|
19
18
|
*/
|
|
20
19
|
class LogStorageExternalS3Service extends log_storage_external_service_1.LogStorageExternalService {
|
|
@@ -25,25 +24,16 @@ class LogStorageExternalS3Service extends log_storage_external_service_1.LogStor
|
|
|
25
24
|
*/
|
|
26
25
|
constructor(logServiceConfig) {
|
|
27
26
|
super(logServiceConfig);
|
|
28
|
-
/**
|
|
29
|
-
* @var {Map<string, Promise<void>>}
|
|
30
|
-
*/
|
|
31
|
-
this.writeQueue = new Map();
|
|
32
27
|
/**
|
|
33
28
|
* @var {Promise<any> | null}
|
|
34
29
|
*/
|
|
35
30
|
this.credentialsCache = null;
|
|
36
|
-
/**
|
|
37
|
-
* @var {number}
|
|
38
|
-
*/
|
|
39
|
-
this.maxRetries = 3;
|
|
40
|
-
/**
|
|
41
|
-
* @var {number}
|
|
42
|
-
*/
|
|
43
|
-
this.baseDelay = 1000;
|
|
44
31
|
this.config = (0, log_storage_external_s3_config_1.getLogStorageExternalS3Config)();
|
|
45
32
|
const firehoseConfig = {
|
|
46
|
-
region: this.config.region
|
|
33
|
+
region: this.config.region,
|
|
34
|
+
requestTimeout: 30000,
|
|
35
|
+
maxAttempts: 3,
|
|
36
|
+
retryMode: 'adaptive'
|
|
47
37
|
};
|
|
48
38
|
if (this.config.roleArn) {
|
|
49
39
|
firehoseConfig.credentials = () => this.getAssumeRoleCredentials();
|
|
@@ -109,17 +99,17 @@ class LogStorageExternalS3Service extends log_storage_external_service_1.LogStor
|
|
|
109
99
|
async refreshAssumeRoleCredentials() {
|
|
110
100
|
const stsClient = new client_sts_1.STSClient({
|
|
111
101
|
region: this.config.region,
|
|
112
|
-
endpoint: this.config.endpoint
|
|
102
|
+
endpoint: this.config.endpoint,
|
|
103
|
+
maxAttempts: 3,
|
|
104
|
+
retryMode: 'adaptive'
|
|
113
105
|
});
|
|
114
106
|
const command = new client_sts_1.AssumeRoleCommand({
|
|
115
107
|
RoleArn: this.config.roleArn,
|
|
116
108
|
RoleSessionName: `log-service-session-${Date.now()}`,
|
|
117
|
-
DurationSeconds: 3600,
|
|
109
|
+
DurationSeconds: 3600,
|
|
118
110
|
});
|
|
119
111
|
try {
|
|
120
|
-
const response = await
|
|
121
|
-
return stsClient.send(command);
|
|
122
|
-
});
|
|
112
|
+
const response = await stsClient.send(command);
|
|
123
113
|
if (!response.Credentials) {
|
|
124
114
|
throw new log_error_1.LogError('Failed to retrieve credentials from STS AssumeRole');
|
|
125
115
|
}
|
|
@@ -131,135 +121,15 @@ class LogStorageExternalS3Service extends log_storage_external_service_1.LogStor
|
|
|
131
121
|
};
|
|
132
122
|
}
|
|
133
123
|
catch (error) {
|
|
134
|
-
console.error('Failed to assume role
|
|
124
|
+
console.error('Failed to assume role:', {
|
|
135
125
|
error: error.message,
|
|
136
126
|
code: error.code,
|
|
137
|
-
statusCode: error.$metadata?.httpStatusCode
|
|
138
|
-
retryable: this.isRetryableError(error)
|
|
127
|
+
statusCode: error.$metadata?.httpStatusCode
|
|
139
128
|
});
|
|
140
129
|
this.credentialsCache = null;
|
|
141
130
|
throw error;
|
|
142
131
|
}
|
|
143
132
|
}
|
|
144
|
-
/**
|
|
145
|
-
* Sleep for specified milliseconds
|
|
146
|
-
*
|
|
147
|
-
* @param {number} ms - Milliseconds to sleep
|
|
148
|
-
*
|
|
149
|
-
* @returns {Promise<void>}
|
|
150
|
-
*/
|
|
151
|
-
sleep(ms) {
|
|
152
|
-
return new Promise(resolve => setTimeout(resolve, ms));
|
|
153
|
-
}
|
|
154
|
-
/**
|
|
155
|
-
* Execute operation with timeout
|
|
156
|
-
*
|
|
157
|
-
* @param {Function} operation - The operation to execute
|
|
158
|
-
* @param {number} timeoutMs - Timeout in milliseconds
|
|
159
|
-
*
|
|
160
|
-
* @returns {Promise<any>}
|
|
161
|
-
*/
|
|
162
|
-
async withTimeout(operation, timeoutMs = 30000) {
|
|
163
|
-
const controller = new AbortController();
|
|
164
|
-
const timeoutId = setTimeout(() => controller.abort(), timeoutMs);
|
|
165
|
-
try {
|
|
166
|
-
const result = await operation();
|
|
167
|
-
clearTimeout(timeoutId);
|
|
168
|
-
return result;
|
|
169
|
-
}
|
|
170
|
-
catch (error) {
|
|
171
|
-
clearTimeout(timeoutId);
|
|
172
|
-
if (controller.signal.aborted) {
|
|
173
|
-
const timeoutError = new log_error_1.LogError(`Operation timed out after ${timeoutMs}ms`);
|
|
174
|
-
timeoutError.name = 'TimeoutError';
|
|
175
|
-
throw timeoutError;
|
|
176
|
-
}
|
|
177
|
-
throw error;
|
|
178
|
-
}
|
|
179
|
-
}
|
|
180
|
-
/**
|
|
181
|
-
* Retry function with exponential backoff
|
|
182
|
-
*
|
|
183
|
-
* @param {Function} operation - The operation to retry
|
|
184
|
-
* @param {number} retries - Number of retries remaining
|
|
185
|
-
* @param {number} delay - Current delay in milliseconds
|
|
186
|
-
*
|
|
187
|
-
* @returns {Promise<any>}
|
|
188
|
-
*/
|
|
189
|
-
async retryWithBackoff(operation, retries = this.maxRetries, delay = this.baseDelay) {
|
|
190
|
-
try {
|
|
191
|
-
return await this.withTimeout(operation);
|
|
192
|
-
}
|
|
193
|
-
catch (error) {
|
|
194
|
-
if (retries === 0) {
|
|
195
|
-
throw error;
|
|
196
|
-
}
|
|
197
|
-
const isRetryable = this.isRetryableError(error);
|
|
198
|
-
if (!isRetryable) {
|
|
199
|
-
throw error;
|
|
200
|
-
}
|
|
201
|
-
console.warn(`Firehose operation failed, retrying in ${delay}ms. Retries left: ${retries}`, {
|
|
202
|
-
error: error.message,
|
|
203
|
-
code: error.code,
|
|
204
|
-
name: error.name,
|
|
205
|
-
retryAttempt: this.maxRetries - retries + 1
|
|
206
|
-
});
|
|
207
|
-
await this.sleep(delay);
|
|
208
|
-
const jitter = Math.random() * 0.1 * delay;
|
|
209
|
-
const nextDelay = delay * 2 + jitter;
|
|
210
|
-
return this.retryWithBackoff(operation, retries - 1, nextDelay);
|
|
211
|
-
}
|
|
212
|
-
}
|
|
213
|
-
/**
|
|
214
|
-
* Check if error is retryable
|
|
215
|
-
*
|
|
216
|
-
* @param {any} error - The error to check
|
|
217
|
-
*
|
|
218
|
-
* @returns {boolean}
|
|
219
|
-
*/
|
|
220
|
-
isRetryableError(error) {
|
|
221
|
-
const retryableCodes = [
|
|
222
|
-
'ECONNRESET',
|
|
223
|
-
'ECONNREFUSED',
|
|
224
|
-
'ETIMEDOUT',
|
|
225
|
-
'EPIPE',
|
|
226
|
-
'EHOSTUNREACH',
|
|
227
|
-
'ENETUNREACH',
|
|
228
|
-
'EAI_AGAIN'
|
|
229
|
-
];
|
|
230
|
-
const retryableMessages = [
|
|
231
|
-
'socket hang up',
|
|
232
|
-
'network timeout',
|
|
233
|
-
'connection timeout',
|
|
234
|
-
'write EPIPE',
|
|
235
|
-
'read ECONNRESET',
|
|
236
|
-
'operation timed out'
|
|
237
|
-
];
|
|
238
|
-
if (error.code
|
|
239
|
-
&& retryableCodes.includes(error.code)) {
|
|
240
|
-
return true;
|
|
241
|
-
}
|
|
242
|
-
if (error.name === 'TimeoutError') {
|
|
243
|
-
return true;
|
|
244
|
-
}
|
|
245
|
-
if (error.message) {
|
|
246
|
-
const message = error.message.toLowerCase();
|
|
247
|
-
const hasRetryableMessage = retryableMessages.some(msg => message.includes(msg));
|
|
248
|
-
if (hasRetryableMessage) {
|
|
249
|
-
return true;
|
|
250
|
-
}
|
|
251
|
-
}
|
|
252
|
-
if (error.$metadata?.httpStatusCode) {
|
|
253
|
-
const statusCode = error.$metadata.httpStatusCode;
|
|
254
|
-
return statusCode >= 500
|
|
255
|
-
|| statusCode === 429;
|
|
256
|
-
}
|
|
257
|
-
if (error.name === 'NetworkError'
|
|
258
|
-
|| error.name === 'NetworkingError') {
|
|
259
|
-
return true;
|
|
260
|
-
}
|
|
261
|
-
return false;
|
|
262
|
-
}
|
|
263
133
|
/**
|
|
264
134
|
* Upload log content to Firehose (which delivers to S3)
|
|
265
135
|
*
|
|
@@ -277,36 +147,31 @@ class LogStorageExternalS3Service extends log_storage_external_service_1.LogStor
|
|
|
277
147
|
const logEntry = log_service_1.LogService.formatLog(log);
|
|
278
148
|
return { Data: Buffer.from(logEntry + '\n', 'utf8') };
|
|
279
149
|
});
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
failedRecordCount: result.FailedPutCount || 0
|
|
292
|
-
});
|
|
293
|
-
return result;
|
|
150
|
+
console.debug(`Sending batch ${i / FIREHOSE_BATCH_SIZE + 1} with ${records.length} records to Firehose`);
|
|
151
|
+
const command = new client_firehose_1.PutRecordBatchCommand({
|
|
152
|
+
DeliveryStreamName: this.config.firehoseStreamName,
|
|
153
|
+
Records: records
|
|
154
|
+
});
|
|
155
|
+
const startTime = Date.now();
|
|
156
|
+
const result = await this.firehose.send(command);
|
|
157
|
+
const duration = Date.now() - startTime;
|
|
158
|
+
console.debug(`Firehose batch sent successfully in ${duration}ms`, {
|
|
159
|
+
batchSize: records.length,
|
|
160
|
+
failedRecordCount: result.FailedPutCount || 0
|
|
294
161
|
});
|
|
295
162
|
}
|
|
296
163
|
}
|
|
297
164
|
catch (error) {
|
|
298
|
-
console.error(`Failed to upload log to Firehose
|
|
165
|
+
console.error(`Failed to upload log to Firehose: ${key}`, {
|
|
299
166
|
error: error.message,
|
|
300
167
|
code: error.code,
|
|
301
|
-
statusCode: error.$metadata?.httpStatusCode
|
|
302
|
-
retryable: this.isRetryableError(error)
|
|
168
|
+
statusCode: error.$metadata?.httpStatusCode
|
|
303
169
|
});
|
|
304
170
|
throw error;
|
|
305
171
|
}
|
|
306
172
|
}
|
|
307
173
|
/**
|
|
308
|
-
* Send log content to Firehose
|
|
309
|
-
* Firehose handles delivery to S3 with buffering and compression
|
|
174
|
+
* Send log content to Firehose
|
|
310
175
|
*
|
|
311
176
|
* @param {string} key The S3 key (path) for the log file (used for metadata)
|
|
312
177
|
* @param {LogType[]} data The new content to send
|
|
@@ -314,29 +179,20 @@ class LogStorageExternalS3Service extends log_storage_external_service_1.LogStor
|
|
|
314
179
|
* @returns {Promise<void>}
|
|
315
180
|
*/
|
|
316
181
|
async appendLog(key, data) {
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
}
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
});
|
|
332
|
-
throw error;
|
|
333
|
-
}
|
|
334
|
-
finally {
|
|
335
|
-
this.writeQueue.delete(key);
|
|
336
|
-
}
|
|
337
|
-
});
|
|
338
|
-
this.writeQueue.set(key, newOperation);
|
|
339
|
-
return newOperation;
|
|
182
|
+
try {
|
|
183
|
+
await this.uploadLog(key, data);
|
|
184
|
+
}
|
|
185
|
+
catch (error) {
|
|
186
|
+
console.error(`Failed to send log to Firehose: ${key}`, {
|
|
187
|
+
error: error.message,
|
|
188
|
+
code: error.code,
|
|
189
|
+
statusCode: error.$metadata?.httpStatusCode,
|
|
190
|
+
requestId: error.$metadata?.requestId,
|
|
191
|
+
batchSize: data.length,
|
|
192
|
+
timestamp: new Date().toISOString()
|
|
193
|
+
});
|
|
194
|
+
throw error;
|
|
195
|
+
}
|
|
340
196
|
}
|
|
341
197
|
/**
|
|
342
198
|
* Writes a log entry to S3 via Firehose
|
|
@@ -369,7 +225,6 @@ class LogStorageExternalS3Service extends log_storage_external_service_1.LogStor
|
|
|
369
225
|
requestId: error.$metadata?.requestId,
|
|
370
226
|
stream: this.config.firehoseStreamName,
|
|
371
227
|
region: this.config.region,
|
|
372
|
-
retryable: this.isRetryableError(error),
|
|
373
228
|
timestamp: new Date().toISOString()
|
|
374
229
|
});
|
|
375
230
|
throw error;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"log.storage.external.s3.service.js","sourceRoot":"","sources":["../../src/services/log.storage.external.s3.service.ts"],"names":[],"mappings":";;;AAAA,8DAAiF;AACjF,oDAAmE;AACnE,iFAA2E;AAG3E,+CAA2C;AAE3C,8FAA0F;AAC1F,mDAA+C;AAE/C
|
|
1
|
+
{"version":3,"file":"log.storage.external.s3.service.js","sourceRoot":"","sources":["../../src/services/log.storage.external.s3.service.ts"],"names":[],"mappings":";;;AAAA,8DAAiF;AACjF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E;aACpC,CACF,CAAC;QACJ,CAAC;QAAC,OAAO,KAAU,EAAE,CAAC;YACpB,OAAO,CAAC,KAAK,CACX,6CAA6C,EAC7C;gBACE,KAAK,EAAE,KAAK,CAAC,OAAO;gBACpB,IAAI,EAAE,KAAK,CAAC,IAAI;gBAChB,IAAI,EAAE,KAAK,CAAC,IAAI;gBAChB,UAAU,EAAE,KAAK,CAAC,SAAS,EAAE,cAAc;gBAC3C,SAAS,EAAE,KAAK,CAAC,SAAS,EAAE,SAAS;gBACrC,MAAM,EAAE,IAAI,CAAC,MAAM,CAAC,kBAAkB;gBACtC,MAAM,EAAE,IAAI,CAAC,MAAM,CAAC,MAAM;gBAC1B,SAAS,EAAE,IAAI,IAAI,EAAE,CAAC,WAAW,EAAE;aACpC,CACF,CAAC;YAEF,MAAM,KAAK,CAAC;QACd,CAAC;IACH,CAAC;CACF;AAxSD,kEAwSC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nicollasfrazao/liguelead-log-service",
|
|
3
|
-
"version": "1.2.
|
|
3
|
+
"version": "1.2.14",
|
|
4
4
|
"description": "A standalone logging service for Express applications with multi-destination storage (local files + S3 via Kinesis Firehose) and comprehensive request tracking using strategy pattern.",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|