ui: update loglevel for observed node warning, drop digit computing from attributeSender

This commit is contained in:
nick-delirium 2025-03-03 16:30:24 +01:00
parent 84771542a6
commit 9f57271af2
No known key found for this signature in database
GPG key ID: 93ABD695DF5FDBA0
4 changed files with 9 additions and 4 deletions

View file

@ -1,3 +1,8 @@
## 16.0.1
- drop computing ts digits
- drop logLevel for "! node is already observed" message (not critical)
## 16.0.0
- **[breaking]** new string dictionary message format

View file

@ -1,7 +1,7 @@
{
"name": "@openreplay/tracker",
"description": "The OpenReplay tracker main package",
"version": "16.0.0",
"version": "16.0.1",
"keywords": [
"logging",
"replay"

View file

@ -334,7 +334,7 @@ export default abstract class Observer {
{
acceptNode: (node) => {
if (this.app.nodes.getID(node) !== undefined) {
this.app.debug.error('! Node is already bound', node)
this.app.debug.warn('! Node is already bound', node)
}
return isIgnored(node) || this.app.nodes.getID(node) !== undefined
? NodeFilter.FILTER_REJECT

View file

@ -17,8 +17,8 @@ export class StringDictionary {
let isNew = false
if (!this.backDict[str]) {
isNew = true
const digits = Math.floor(Math.log10(Date.now())) + 1
const shavedTs = Date.now() % (10 ** (digits - 2))
// shaving the first 2 digits of the timestamp (since they are irrelevant for next millennia)
const shavedTs = Date.now() % 10 ** (13 - 2)
let id: number = shavedTs
if (id === this.lastTs) {
id = id * 10000 + this.lastSuffix