Fixed ID in trace
MODIFY
src/storage/mongodb/PerformanceStorage.ts
src/storage/mongodb/PerformanceStorage.ts
@@ -2,6 +2,7 @@ import global, { FilterParams } from '../../types/GlobalType';
import Constants from '../../utils/Constants';
import { DeletedResult } from '../../types/DataResult';
+import { ObjectId } from 'mongodb';
import PerformanceRecord from '../../types/Performance';
import Utils from '../../utils/Utils';
@@ -20,7 +21,7 @@ export default class PerformanceStorage {
// // Set
// performanceRecord.id = result.insertedId.toString();
// return performanceRecord.id;
- return Promise.resolve('NotImplemented');
+ return Promise.resolve(new ObjectId().toString());
}
public static async updatePerformanceRecord(performanceRecord: PerformanceRecord): Promise<void> {

MODIFY
src/utils/Logging.ts
src/utils/Logging.ts
@@ -785,12 +785,12 @@ export default class Logging {
// Add Exception stack
if (exception.params.detailedMessages) {
exception.params.detailedMessages = {
- 'stack': exception.stack,
+ 'error': exception.stack,
'previous': exception.params.detailedMessages
};
} else {
exception.params.detailedMessages = {
- 'stack': exception.stack,
+ 'error': exception.stack,
};
}
await Logging.logError({
@@ -813,12 +813,12 @@ export default class Logging {
// Add Exception stack
if (exception.params.detailedMessages) {
exception.params.detailedMessages = {
- 'stack': exception.stack,
+ 'error': exception.stack,
'previous': exception.params.detailedMessages
};
} else {
exception.params.detailedMessages = {
- 'stack': exception.stack,
+ 'error': exception.stack,
};
}
await Logging.logError({

Fixed ID in trace