From cd8b09b6daf287bfb7153410efbcd73093d98102 Mon Sep 17 00:00:00 2001 From: yiqianxu Date: Wed, 2 Nov 2022 11:23:04 +0800 Subject: [PATCH 1/5] profile error try catch Signed-off-by: yiqianxu --- camera-front/node/routers/file.js | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/camera-front/node/routers/file.js b/camera-front/node/routers/file.js index a6e7bc386..f7bfdbe23 100644 --- a/camera-front/node/routers/file.js +++ b/camera-front/node/routers/file.js @@ -114,12 +114,22 @@ router.get('/getTraceFile', function(req, res, next) { let cpuEventsList = []; let cpuEvents = []; - _.forEach(cpuEventStrs, (str) => cpuEventsList.push(JSON.parse(str))); + _.forEach(cpuEventStrs, (str) => { + try { + cpuEventsList.push(JSON.parse(str)) + } catch (error) { + console.error(str); + } + }); cpuEvents = _.map(cpuEventsList, 'labels'); _.forEach(cpuEvents, item => { - item.cpuEvents = JSON.parse(item.cpuEvents); - item.javaFutexEvents = JSON.parse(item.javaFutexEvents); - item.transactionIds = JSON.parse(item.transactionIds); + try { + item.cpuEvents = JSON.parse(item.cpuEvents); + item.javaFutexEvents = JSON.parse(item.javaFutexEvents); + item.transactionIds = JSON.parse(item.transactionIds); + } catch (error) { + console.error(error, item); + } }); let finalResult = { From 9277b471d6408f091f58aed79cb6f0350e12532e Mon Sep 17 00:00:00 2001 From: yiqianxu Date: Wed, 2 Nov 2022 13:39:46 +0800 Subject: [PATCH 2/5] default namespace is not relate to vm node Signed-off-by: yiqianxu --- grafana-plugins/topo-plugin/src/topology/services.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/grafana-plugins/topo-plugin/src/topology/services.ts b/grafana-plugins/topo-plugin/src/topology/services.ts index 286c4d9eb..86b0b1815 100644 --- a/grafana-plugins/topo-plugin/src/topology/services.ts +++ b/grafana-plugins/topo-plugin/src/topology/services.ts @@ -30,7 +30,7 @@ export const showServiceOptions = [ // externalTypes:The namespace enumeration value of the current external call -const externalTypes: string[] = ['NOT_FOUND_EXTERNAL', 'NOT_FOUND_INTERNAL', 'EXTERNAL', 'external', 'default']; +const externalTypes: string[] = ['NOT_FOUND_EXTERNAL', 'NOT_FOUND_INTERNAL', 'EXTERNAL', 'external']; // workloadTypes const workloadTypes: string[] = ['workload', 'deployment', 'daemonset', 'statefulset', 'node']; From 255658e852dc57718287e5f318bfff323fb97f77 Mon Sep 17 00:00:00 2001 From: yiqianxu Date: Wed, 2 Nov 2022 13:43:44 +0800 Subject: [PATCH 3/5] add changeLog.md Signed-off-by: yiqianxu --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 793ba9fc9..85021115e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -29,6 +29,7 @@ - Declare the 9500 port in the agent's deployment file ([#282](https://github.com/CloudDectective-Harmonycloud/kindling/pull/282)) ### Bug fixes +- fix the topology node naming error in the default namespace。([#346]https://github.com/CloudDectective-Harmonycloud/kindling/pull/346). - Avoid printing logs to console when both `observability.logger.file_level` and `observability.logger.console_level` are set to none([#316](https://github.com/CloudDectective-Harmonycloud/kindling/pull/316)) - Fix the userAttributes array out of range error caused by userAttNumber exceeding 8 - Fix the bug where no HTTP headers were got. ([#301](https://github.com/CloudDectective-Harmonycloud/kindling/pull/301)) From 74e8fb5eaf42ae2c79f0086fe8bae5c25a36779c Mon Sep 17 00:00:00 2001 From: yiqianxu Date: Wed, 2 Nov 2022 13:45:18 +0800 Subject: [PATCH 4/5] add changeLog.md Signed-off-by: yiqianxu --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 85021115e..210cc6289 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -29,7 +29,7 @@ - Declare the 9500 port in the agent's deployment file ([#282](https://github.com/CloudDectective-Harmonycloud/kindling/pull/282)) ### Bug fixes -- fix the topology node naming error in the default namespace。([#346]https://github.com/CloudDectective-Harmonycloud/kindling/pull/346). +- Fix the topology node naming error in the default namespace.([#346](https://github.com/CloudDectective-Harmonycloud/kindling/pull/346)) - Avoid printing logs to console when both `observability.logger.file_level` and `observability.logger.console_level` are set to none([#316](https://github.com/CloudDectective-Harmonycloud/kindling/pull/316)) - Fix the userAttributes array out of range error caused by userAttNumber exceeding 8 - Fix the bug where no HTTP headers were got. ([#301](https://github.com/CloudDectective-Harmonycloud/kindling/pull/301)) From 0de22a21d61ddd8a45b6a559ea68d470c063db37 Mon Sep 17 00:00:00 2001 From: yiqianxu Date: Wed, 2 Nov 2022 13:46:41 +0800 Subject: [PATCH 5/5] change changeLog.md Signed-off-by: yiqianxu --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 210cc6289..1d7e5eff4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -11,6 +11,7 @@ - Add request and response payload of `Redis` protocol message to `Span` data. ([#325](https://github.com/CloudDectective-Harmonycloud/kindling/pull/325)) ### Bug fixes +- Fix the topology node naming error in the default namespace.([#346](https://github.com/CloudDectective-Harmonycloud/kindling/pull/346)) - Fix the bug that if `ReadBytes` receives negative numbers as arguments, the program panics with the error of slice outofbound. ([#327](https://github.com/CloudDectective-Harmonycloud/kindling/pull/327)) ## v0.4.1 - 2022-09-21 @@ -29,7 +30,6 @@ - Declare the 9500 port in the agent's deployment file ([#282](https://github.com/CloudDectective-Harmonycloud/kindling/pull/282)) ### Bug fixes -- Fix the topology node naming error in the default namespace.([#346](https://github.com/CloudDectective-Harmonycloud/kindling/pull/346)) - Avoid printing logs to console when both `observability.logger.file_level` and `observability.logger.console_level` are set to none([#316](https://github.com/CloudDectective-Harmonycloud/kindling/pull/316)) - Fix the userAttributes array out of range error caused by userAttNumber exceeding 8 - Fix the bug where no HTTP headers were got. ([#301](https://github.com/CloudDectective-Harmonycloud/kindling/pull/301))