Skip to content

Commit 8a06a14

Browse files
Merge pull request #3503 from RedisInsight/bugfix/ri-5336-profiler-crash-on-invalid-timestamp
RI-5336: Fix profiler timestamp if its invalid
2 parents aa71be3 + 04c0c72 commit 8a06a14

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

redisinsight/api/src/modules/profiler/models/profiler.client.ts

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,8 +43,14 @@ export class ProfilerClient {
4343
time, args, source, database,
4444
} = payload;
4545

46+
// If there's [ in the time, strip it out.
47+
//
48+
// There is a case of a timestamp coming with '[' on Alibaba
49+
// Redis's monitor.
50+
const newTime = time.split('[')[0];
51+
4652
this.items.push({
47-
time, args, source, database,
53+
time: newTime, args, source, database,
4854
});
4955

5056
this.debounce();

0 commit comments

Comments
 (0)