From 6dc3dcfd4e3c31b8bc5b48f435a6036b4708ddb1 Mon Sep 17 00:00:00 2001 From: Alexander Date: Thu, 6 Mar 2025 13:49:18 +0100 Subject: [PATCH] feat(proto): removed a part of deprecated messages (min supported tracker version is 6.0.0) --- backend/cmd/db/main.go | 2 +- backend/cmd/sink/main.go | 1 - backend/internal/sink/assetscache/assets.go | 11 - backend/pkg/handlers/web/deadClick.go | 2 - backend/pkg/messages/filters.go | 4 +- backend/pkg/messages/iterator.go | 19 +- .../pkg/messages/legacy-message-transform.go | 28 -- backend/pkg/messages/messages.go | 252 ------------------ backend/pkg/messages/read-message.go | 180 ------------- backend/pkg/messages/reader.go | 4 +- backend/pkg/sessions/api/web/handlers.go | 34 ++- ee/connectors/msgcodec/messages.py | 99 +------ ee/connectors/msgcodec/messages.pyx | 147 ++-------- ee/connectors/msgcodec/msgcodec.py | 75 +----- ee/connectors/msgcodec/msgcodec.pyx | 75 +----- .../web/messages/RawMessageReader.gen.ts | 76 ------ .../app/player/web/messages/filters.gen.ts | 2 +- .../app/player/web/messages/message.gen.ts | 15 -- frontend/app/player/web/messages/raw.gen.ts | 50 +--- .../player/web/messages/tracker-legacy.gen.ts | 5 - .../app/player/web/messages/tracker.gen.ts | 98 +------ mobs/messages.rb | 72 +---- tracker/tracker/src/common/messages.gen.ts | 50 +--- tracker/tracker/src/main/app/messages.gen.ts | 81 ------ .../src/webworker/MessageEncoder.gen.ts | 20 -- 25 files changed, 79 insertions(+), 1323 deletions(-) diff --git a/backend/cmd/db/main.go b/backend/cmd/db/main.go index 056403fae..6409cd204 100644 --- a/backend/cmd/db/main.go +++ b/backend/cmd/db/main.go @@ -64,7 +64,7 @@ func main() { messages.MsgMetadata, messages.MsgIssueEvent, messages.MsgSessionStart, messages.MsgSessionEnd, messages.MsgUserID, messages.MsgUserAnonymousID, messages.MsgIntegrationEvent, messages.MsgPerformanceTrackAggr, messages.MsgJSException, messages.MsgResourceTiming, messages.MsgCustomEvent, messages.MsgCustomIssue, - messages.MsgFetch, messages.MsgNetworkRequest, messages.MsgGraphQL, messages.MsgStateAction, messages.MsgMouseClick, + messages.MsgNetworkRequest, messages.MsgGraphQL, messages.MsgStateAction, messages.MsgMouseClick, messages.MsgMouseClickDeprecated, messages.MsgSetPageLocation, messages.MsgSetPageLocationDeprecated, messages.MsgPageLoadTiming, messages.MsgPageRenderTiming, messages.MsgPageEvent, messages.MsgPageEventDeprecated, messages.MsgMouseThrashing, messages.MsgInputChange, diff --git a/backend/cmd/sink/main.go b/backend/cmd/sink/main.go index 42917017e..b0d5da110 100644 --- a/backend/cmd/sink/main.go +++ b/backend/cmd/sink/main.go @@ -98,7 +98,6 @@ func main() { // Process assets if msg.TypeID() == messages.MsgSetNodeAttributeURLBased || msg.TypeID() == messages.MsgSetCSSDataURLBased || - msg.TypeID() == messages.MsgCSSInsertRuleURLBased || msg.TypeID() == messages.MsgAdoptedSSReplaceURLBased || msg.TypeID() == messages.MsgAdoptedSSInsertRuleURLBased { m := msg.Decode() diff --git a/backend/internal/sink/assetscache/assets.go b/backend/internal/sink/assetscache/assets.go index d726cc094..3274f1f1f 100644 --- a/backend/internal/sink/assetscache/assets.go +++ b/backend/internal/sink/assetscache/assets.go @@ -131,17 +131,6 @@ func (e *AssetsCache) ParseAssets(msg messages.Message) messages.Message { } newMsg.SetMeta(msg.Meta()) return newMsg - case *messages.CSSInsertRuleURLBased: - if e.shouldSkipAsset(m.BaseURL) { - return msg - } - newMsg := &messages.CSSInsertRule{ - ID: m.ID, - Index: m.Index, - Rule: e.handleCSS(m.SessionID(), m.BaseURL, m.Rule), - } - newMsg.SetMeta(msg.Meta()) - return newMsg case *messages.AdoptedSSReplaceURLBased: if e.shouldSkipAsset(m.BaseURL) { return msg diff --git a/backend/pkg/handlers/web/deadClick.go b/backend/pkg/handlers/web/deadClick.go index e2c9dc10c..78d2f4408 100644 --- a/backend/pkg/handlers/web/deadClick.go +++ b/backend/pkg/handlers/web/deadClick.go @@ -77,8 +77,6 @@ func (d *DeadClickDetector) Handle(message Message, timestamp uint64) Message { *MoveNode, *RemoveNode, *SetCSSData, - *CSSInsertRule, - *CSSDeleteRule, *SetInputValue, *SetInputChecked: return d.Build() diff --git a/backend/pkg/messages/filters.go b/backend/pkg/messages/filters.go index 094586abf..efd957240 100644 --- a/backend/pkg/messages/filters.go +++ b/backend/pkg/messages/filters.go @@ -2,7 +2,7 @@ package messages func IsReplayerType(id int) bool { - return 1 != id && 3 != id && 17 != id && 23 != id && 24 != id && 25 != id && 26 != id && 27 != id && 28 != id && 29 != id && 30 != id && 31 != id && 32 != id && 33 != id && 42 != id && 56 != id && 62 != id && 63 != id && 64 != id && 66 != id && 78 != id && 80 != id && 81 != id && 82 != id && 112 != id && 115 != id && 124 != id && 125 != id && 126 != id && 127 != id && 90 != id && 91 != id && 92 != id && 94 != id && 95 != id && 97 != id && 98 != id && 107 != id && 110 != id + return 1 != id && 17 != id && 23 != id && 24 != id && 26 != id && 27 != id && 28 != id && 29 != id && 30 != id && 31 != id && 32 != id && 33 != id && 42 != id && 56 != id && 63 != id && 64 != id && 66 != id && 78 != id && 81 != id && 82 != id && 112 != id && 115 != id && 124 != id && 125 != id && 126 != id && 127 != id && 90 != id && 91 != id && 92 != id && 94 != id && 95 != id && 97 != id && 98 != id && 107 != id && 110 != id } func IsMobileType(id int) bool { @@ -10,5 +10,5 @@ func IsMobileType(id int) bool { } func IsDOMType(id int) bool { - return 0 == id || 4 == id || 5 == id || 6 == id || 7 == id || 8 == id || 9 == id || 10 == id || 11 == id || 12 == id || 13 == id || 14 == id || 15 == id || 16 == id || 18 == id || 19 == id || 20 == id || 34 == id || 35 == id || 37 == id || 38 == id || 49 == id || 50 == id || 51 == id || 43 == id || 52 == id || 54 == id || 55 == id || 57 == id || 58 == id || 59 == id || 60 == id || 61 == id || 67 == id || 68 == id || 69 == id || 70 == id || 71 == id || 72 == id || 73 == id || 74 == id || 75 == id || 76 == id || 77 == id || 113 == id || 114 == id || 117 == id || 118 == id || 119 == id || 122 == id || 93 == id || 96 == id || 100 == id || 101 == id || 102 == id || 103 == id || 104 == id || 105 == id || 106 == id || 111 == id + return 0 == id || 4 == id || 5 == id || 6 == id || 7 == id || 8 == id || 9 == id || 10 == id || 11 == id || 12 == id || 13 == id || 14 == id || 15 == id || 16 == id || 18 == id || 19 == id || 20 == id || 34 == id || 35 == id || 49 == id || 50 == id || 51 == id || 43 == id || 52 == id || 54 == id || 55 == id || 57 == id || 58 == id || 60 == id || 61 == id || 68 == id || 69 == id || 70 == id || 71 == id || 72 == id || 73 == id || 74 == id || 75 == id || 76 == id || 77 == id || 113 == id || 114 == id || 117 == id || 118 == id || 119 == id || 122 == id || 93 == id || 96 == id || 100 == id || 101 == id || 102 == id || 103 == id || 104 == id || 105 == id || 106 == id || 111 == id } diff --git a/backend/pkg/messages/iterator.go b/backend/pkg/messages/iterator.go index ced1c20a6..104da38fa 100644 --- a/backend/pkg/messages/iterator.go +++ b/backend/pkg/messages/iterator.go @@ -44,9 +44,8 @@ func NewMessageIterator(log logger.Logger, messageHandler MessageHandler, messag iter.filter = filter } iter.preFilter = map[int]struct{}{ - MsgBatchMetadata: {}, MsgBatchMeta: {}, MsgTimestamp: {}, - MsgSessionStart: {}, MsgSessionEnd: {}, MsgSetPageLocation: {}, - MsgMobileBatchMeta: {}, + MsgBatchMetadata: {}, MsgTimestamp: {}, MsgSessionStart: {}, + MsgSessionEnd: {}, MsgSetPageLocation: {}, MsgMobileBatchMeta: {}, } return iter } @@ -152,20 +151,6 @@ func (i *messageIteratorImpl) preprocessing(msg Message) error { i.version = m.Version i.batchInfo.version = m.Version - case *BatchMeta: // Is not required to be present in batch since Mobile doesn't have it (though we might change it) - if i.messageInfo.Index > 1 { // Might be several 0-0 BatchMeta in a row without an error though - return fmt.Errorf("batchMeta found at the end of the batch, info: %s", i.batchInfo.Info()) - } - i.messageInfo.Index = m.PageNo<<32 + m.FirstIndex // 2^32 is the maximum count of messages per page (ha-ha) - i.messageInfo.Timestamp = uint64(m.Timestamp) - if m.Timestamp == 0 { - i.zeroTsLog("BatchMeta") - } - // Try to get saved session's page url - if savedURL := i.urls.Get(i.messageInfo.batch.sessionID); savedURL != "" { - i.messageInfo.Url = savedURL - } - case *Timestamp: i.messageInfo.Timestamp = m.Timestamp if m.Timestamp == 0 { diff --git a/backend/pkg/messages/legacy-message-transform.go b/backend/pkg/messages/legacy-message-transform.go index 23ab1e52d..2d97e252b 100644 --- a/backend/pkg/messages/legacy-message-transform.go +++ b/backend/pkg/messages/legacy-message-transform.go @@ -2,34 +2,6 @@ package messages func transformDeprecated(msg Message) Message { switch m := msg.(type) { - case *JSExceptionDeprecated: - return &JSException{ - Name: m.Name, - Message: m.Message, - Payload: m.Payload, - Metadata: "{}", - } - case *Fetch: - return &NetworkRequest{ - Type: "fetch", - Method: m.Method, - URL: m.URL, - Request: m.Request, - Response: m.Response, - Status: m.Status, - Timestamp: m.Timestamp, - Duration: m.Duration, - } - case *IssueEventDeprecated: - return &IssueEvent{ - MessageID: m.MessageID, - Timestamp: m.Timestamp, - Type: m.Type, - ContextString: m.ContextString, - Context: m.Context, - Payload: m.Payload, - URL: "", - } case *ResourceTimingDeprecated: return &ResourceTiming{ Timestamp: m.Timestamp, diff --git a/backend/pkg/messages/messages.go b/backend/pkg/messages/messages.go index d4f184d48..a554812fe 100644 --- a/backend/pkg/messages/messages.go +++ b/backend/pkg/messages/messages.go @@ -4,7 +4,6 @@ package messages const ( MsgTimestamp = 0 MsgSessionStart = 1 - MsgSessionEndDeprecated = 3 MsgSetPageLocationDeprecated = 4 MsgSetViewportSize = 5 MsgSetViewportScroll = 6 @@ -26,7 +25,6 @@ const ( MsgConsoleLog = 22 MsgPageLoadTiming = 23 MsgPageRenderTiming = 24 - MsgJSExceptionDeprecated = 25 MsgIntegrationEvent = 26 MsgCustomEvent = 27 MsgUserID = 28 @@ -37,9 +35,6 @@ const ( MsgPageEvent = 33 MsgStringDictGlobal = 34 MsgSetNodeAttributeDictGlobal = 35 - MsgCSSInsertRule = 37 - MsgCSSDeleteRule = 38 - MsgFetch = 39 MsgProfiler = 40 MsgOTable = 41 MsgStateAction = 42 @@ -59,14 +54,11 @@ const ( MsgPerformanceTrackAggr = 56 MsgLoadFontFace = 57 MsgSetNodeFocus = 58 - MsgLongTask = 59 MsgSetNodeAttributeURLBased = 60 MsgSetCSSDataURLBased = 61 - MsgIssueEventDeprecated = 62 MsgTechnicalInfo = 63 MsgCustomIssue = 64 MsgAssetCache = 66 - MsgCSSInsertRuleURLBased = 67 MsgMouseClick = 68 MsgMouseClickDeprecated = 69 MsgCreateIFrameDocument = 70 @@ -79,7 +71,6 @@ const ( MsgAdoptedSSRemoveOwner = 77 MsgJSException = 78 MsgZustand = 79 - MsgBatchMeta = 80 MsgBatchMetadata = 81 MsgPartitionedMessage = 82 MsgNetworkRequest = 83 @@ -193,27 +184,6 @@ func (msg *SessionStart) TypeID() int { return 1 } -type SessionEndDeprecated struct { - message - Timestamp uint64 -} - -func (msg *SessionEndDeprecated) Encode() []byte { - buf := make([]byte, 11) - buf[0] = 3 - p := 1 - p = WriteUint(msg.Timestamp, buf, p) - return buf[:p] -} - -func (msg *SessionEndDeprecated) Decode() Message { - return msg -} - -func (msg *SessionEndDeprecated) TypeID() int { - return 3 -} - type SetPageLocationDeprecated struct { message URL string @@ -738,31 +708,6 @@ func (msg *PageRenderTiming) TypeID() int { return 24 } -type JSExceptionDeprecated struct { - message - Name string - Message string - Payload string -} - -func (msg *JSExceptionDeprecated) Encode() []byte { - buf := make([]byte, 31+len(msg.Name)+len(msg.Message)+len(msg.Payload)) - buf[0] = 25 - p := 1 - p = WriteString(msg.Name, buf, p) - p = WriteString(msg.Message, buf, p) - p = WriteString(msg.Payload, buf, p) - return buf[:p] -} - -func (msg *JSExceptionDeprecated) Decode() Message { - return msg -} - -func (msg *JSExceptionDeprecated) TypeID() int { - return 25 -} - type IntegrationEvent struct { message Timestamp uint64 @@ -1065,87 +1010,6 @@ func (msg *SetNodeAttributeDictGlobal) TypeID() int { return 35 } -type CSSInsertRule struct { - message - ID uint64 - Rule string - Index uint64 -} - -func (msg *CSSInsertRule) Encode() []byte { - buf := make([]byte, 31+len(msg.Rule)) - buf[0] = 37 - p := 1 - p = WriteUint(msg.ID, buf, p) - p = WriteString(msg.Rule, buf, p) - p = WriteUint(msg.Index, buf, p) - return buf[:p] -} - -func (msg *CSSInsertRule) Decode() Message { - return msg -} - -func (msg *CSSInsertRule) TypeID() int { - return 37 -} - -type CSSDeleteRule struct { - message - ID uint64 - Index uint64 -} - -func (msg *CSSDeleteRule) Encode() []byte { - buf := make([]byte, 21) - buf[0] = 38 - p := 1 - p = WriteUint(msg.ID, buf, p) - p = WriteUint(msg.Index, buf, p) - return buf[:p] -} - -func (msg *CSSDeleteRule) Decode() Message { - return msg -} - -func (msg *CSSDeleteRule) TypeID() int { - return 38 -} - -type Fetch struct { - message - Method string - URL string - Request string - Response string - Status uint64 - Timestamp uint64 - Duration uint64 -} - -func (msg *Fetch) Encode() []byte { - buf := make([]byte, 71+len(msg.Method)+len(msg.URL)+len(msg.Request)+len(msg.Response)) - buf[0] = 39 - p := 1 - p = WriteString(msg.Method, buf, p) - p = WriteString(msg.URL, buf, p) - p = WriteString(msg.Request, buf, p) - p = WriteString(msg.Response, buf, p) - p = WriteUint(msg.Status, buf, p) - p = WriteUint(msg.Timestamp, buf, p) - p = WriteUint(msg.Duration, buf, p) - return buf[:p] -} - -func (msg *Fetch) Decode() Message { - return msg -} - -func (msg *Fetch) TypeID() int { - return 39 -} - type Profiler struct { message Name string @@ -1639,39 +1503,6 @@ func (msg *SetNodeFocus) TypeID() int { return 58 } -type LongTask struct { - message - Timestamp uint64 - Duration uint64 - Context uint64 - ContainerType uint64 - ContainerSrc string - ContainerId string - ContainerName string -} - -func (msg *LongTask) Encode() []byte { - buf := make([]byte, 71+len(msg.ContainerSrc)+len(msg.ContainerId)+len(msg.ContainerName)) - buf[0] = 59 - p := 1 - p = WriteUint(msg.Timestamp, buf, p) - p = WriteUint(msg.Duration, buf, p) - p = WriteUint(msg.Context, buf, p) - p = WriteUint(msg.ContainerType, buf, p) - p = WriteString(msg.ContainerSrc, buf, p) - p = WriteString(msg.ContainerId, buf, p) - p = WriteString(msg.ContainerName, buf, p) - return buf[:p] -} - -func (msg *LongTask) Decode() Message { - return msg -} - -func (msg *LongTask) TypeID() int { - return 59 -} - type SetNodeAttributeURLBased struct { message ID uint64 @@ -1724,37 +1555,6 @@ func (msg *SetCSSDataURLBased) TypeID() int { return 61 } -type IssueEventDeprecated struct { - message - MessageID uint64 - Timestamp uint64 - Type string - ContextString string - Context string - Payload string -} - -func (msg *IssueEventDeprecated) Encode() []byte { - buf := make([]byte, 61+len(msg.Type)+len(msg.ContextString)+len(msg.Context)+len(msg.Payload)) - buf[0] = 62 - p := 1 - p = WriteUint(msg.MessageID, buf, p) - p = WriteUint(msg.Timestamp, buf, p) - p = WriteString(msg.Type, buf, p) - p = WriteString(msg.ContextString, buf, p) - p = WriteString(msg.Context, buf, p) - p = WriteString(msg.Payload, buf, p) - return buf[:p] -} - -func (msg *IssueEventDeprecated) Decode() Message { - return msg -} - -func (msg *IssueEventDeprecated) TypeID() int { - return 62 -} - type TechnicalInfo struct { message Type string @@ -1822,33 +1622,6 @@ func (msg *AssetCache) TypeID() int { return 66 } -type CSSInsertRuleURLBased struct { - message - ID uint64 - Rule string - Index uint64 - BaseURL string -} - -func (msg *CSSInsertRuleURLBased) Encode() []byte { - buf := make([]byte, 41+len(msg.Rule)+len(msg.BaseURL)) - buf[0] = 67 - p := 1 - p = WriteUint(msg.ID, buf, p) - p = WriteString(msg.Rule, buf, p) - p = WriteUint(msg.Index, buf, p) - p = WriteString(msg.BaseURL, buf, p) - return buf[:p] -} - -func (msg *CSSInsertRuleURLBased) Decode() Message { - return msg -} - -func (msg *CSSInsertRuleURLBased) TypeID() int { - return 67 -} - type MouseClick struct { message ID uint64 @@ -2149,31 +1922,6 @@ func (msg *Zustand) TypeID() int { return 79 } -type BatchMeta struct { - message - PageNo uint64 - FirstIndex uint64 - Timestamp int64 -} - -func (msg *BatchMeta) Encode() []byte { - buf := make([]byte, 31) - buf[0] = 80 - p := 1 - p = WriteUint(msg.PageNo, buf, p) - p = WriteUint(msg.FirstIndex, buf, p) - p = WriteInt(msg.Timestamp, buf, p) - return buf[:p] -} - -func (msg *BatchMeta) Decode() Message { - return msg -} - -func (msg *BatchMeta) TypeID() int { - return 80 -} - type BatchMetadata struct { message Version uint64 diff --git a/backend/pkg/messages/read-message.go b/backend/pkg/messages/read-message.go index f0051a042..380e0b6b2 100644 --- a/backend/pkg/messages/read-message.go +++ b/backend/pkg/messages/read-message.go @@ -68,15 +68,6 @@ func DecodeSessionStart(reader BytesReader) (Message, error) { return msg, err } -func DecodeSessionEndDeprecated(reader BytesReader) (Message, error) { - var err error = nil - msg := &SessionEndDeprecated{} - if msg.Timestamp, err = reader.ReadUint(); err != nil { - return nil, err - } - return msg, err -} - func DecodeSetPageLocationDeprecated(reader BytesReader) (Message, error) { var err error = nil msg := &SetPageLocationDeprecated{} @@ -390,21 +381,6 @@ func DecodePageRenderTiming(reader BytesReader) (Message, error) { return msg, err } -func DecodeJSExceptionDeprecated(reader BytesReader) (Message, error) { - var err error = nil - msg := &JSExceptionDeprecated{} - if msg.Name, err = reader.ReadString(); err != nil { - return nil, err - } - if msg.Message, err = reader.ReadString(); err != nil { - return nil, err - } - if msg.Payload, err = reader.ReadString(); err != nil { - return nil, err - } - return msg, err -} - func DecodeIntegrationEvent(reader BytesReader) (Message, error) { var err error = nil msg := &IntegrationEvent{} @@ -633,60 +609,6 @@ func DecodeSetNodeAttributeDictGlobal(reader BytesReader) (Message, error) { return msg, err } -func DecodeCSSInsertRule(reader BytesReader) (Message, error) { - var err error = nil - msg := &CSSInsertRule{} - if msg.ID, err = reader.ReadUint(); err != nil { - return nil, err - } - if msg.Rule, err = reader.ReadString(); err != nil { - return nil, err - } - if msg.Index, err = reader.ReadUint(); err != nil { - return nil, err - } - return msg, err -} - -func DecodeCSSDeleteRule(reader BytesReader) (Message, error) { - var err error = nil - msg := &CSSDeleteRule{} - if msg.ID, err = reader.ReadUint(); err != nil { - return nil, err - } - if msg.Index, err = reader.ReadUint(); err != nil { - return nil, err - } - return msg, err -} - -func DecodeFetch(reader BytesReader) (Message, error) { - var err error = nil - msg := &Fetch{} - if msg.Method, err = reader.ReadString(); err != nil { - return nil, err - } - if msg.URL, err = reader.ReadString(); err != nil { - return nil, err - } - if msg.Request, err = reader.ReadString(); err != nil { - return nil, err - } - if msg.Response, err = reader.ReadString(); err != nil { - return nil, err - } - if msg.Status, err = reader.ReadUint(); err != nil { - return nil, err - } - if msg.Timestamp, err = reader.ReadUint(); err != nil { - return nil, err - } - if msg.Duration, err = reader.ReadUint(); err != nil { - return nil, err - } - return msg, err -} - func DecodeProfiler(reader BytesReader) (Message, error) { var err error = nil msg := &Profiler{} @@ -999,33 +921,6 @@ func DecodeSetNodeFocus(reader BytesReader) (Message, error) { return msg, err } -func DecodeLongTask(reader BytesReader) (Message, error) { - var err error = nil - msg := &LongTask{} - if msg.Timestamp, err = reader.ReadUint(); err != nil { - return nil, err - } - if msg.Duration, err = reader.ReadUint(); err != nil { - return nil, err - } - if msg.Context, err = reader.ReadUint(); err != nil { - return nil, err - } - if msg.ContainerType, err = reader.ReadUint(); err != nil { - return nil, err - } - if msg.ContainerSrc, err = reader.ReadString(); err != nil { - return nil, err - } - if msg.ContainerId, err = reader.ReadString(); err != nil { - return nil, err - } - if msg.ContainerName, err = reader.ReadString(); err != nil { - return nil, err - } - return msg, err -} - func DecodeSetNodeAttributeURLBased(reader BytesReader) (Message, error) { var err error = nil msg := &SetNodeAttributeURLBased{} @@ -1059,30 +954,6 @@ func DecodeSetCSSDataURLBased(reader BytesReader) (Message, error) { return msg, err } -func DecodeIssueEventDeprecated(reader BytesReader) (Message, error) { - var err error = nil - msg := &IssueEventDeprecated{} - if msg.MessageID, err = reader.ReadUint(); err != nil { - return nil, err - } - if msg.Timestamp, err = reader.ReadUint(); err != nil { - return nil, err - } - if msg.Type, err = reader.ReadString(); err != nil { - return nil, err - } - if msg.ContextString, err = reader.ReadString(); err != nil { - return nil, err - } - if msg.Context, err = reader.ReadString(); err != nil { - return nil, err - } - if msg.Payload, err = reader.ReadString(); err != nil { - return nil, err - } - return msg, err -} - func DecodeTechnicalInfo(reader BytesReader) (Message, error) { var err error = nil msg := &TechnicalInfo{} @@ -1116,24 +987,6 @@ func DecodeAssetCache(reader BytesReader) (Message, error) { return msg, err } -func DecodeCSSInsertRuleURLBased(reader BytesReader) (Message, error) { - var err error = nil - msg := &CSSInsertRuleURLBased{} - if msg.ID, err = reader.ReadUint(); err != nil { - return nil, err - } - if msg.Rule, err = reader.ReadString(); err != nil { - return nil, err - } - if msg.Index, err = reader.ReadUint(); err != nil { - return nil, err - } - if msg.BaseURL, err = reader.ReadString(); err != nil { - return nil, err - } - return msg, err -} - func DecodeMouseClick(reader BytesReader) (Message, error) { var err error = nil msg := &MouseClick{} @@ -1314,21 +1167,6 @@ func DecodeZustand(reader BytesReader) (Message, error) { return msg, err } -func DecodeBatchMeta(reader BytesReader) (Message, error) { - var err error = nil - msg := &BatchMeta{} - if msg.PageNo, err = reader.ReadUint(); err != nil { - return nil, err - } - if msg.FirstIndex, err = reader.ReadUint(); err != nil { - return nil, err - } - if msg.Timestamp, err = reader.ReadInt(); err != nil { - return nil, err - } - return msg, err -} - func DecodeBatchMetadata(reader BytesReader) (Message, error) { var err error = nil msg := &BatchMetadata{} @@ -2088,8 +1926,6 @@ func ReadMessage(t uint64, reader BytesReader) (Message, error) { return DecodeTimestamp(reader) case 1: return DecodeSessionStart(reader) - case 3: - return DecodeSessionEndDeprecated(reader) case 4: return DecodeSetPageLocationDeprecated(reader) case 5: @@ -2132,8 +1968,6 @@ func ReadMessage(t uint64, reader BytesReader) (Message, error) { return DecodePageLoadTiming(reader) case 24: return DecodePageRenderTiming(reader) - case 25: - return DecodeJSExceptionDeprecated(reader) case 26: return DecodeIntegrationEvent(reader) case 27: @@ -2154,12 +1988,6 @@ func ReadMessage(t uint64, reader BytesReader) (Message, error) { return DecodeStringDictGlobal(reader) case 35: return DecodeSetNodeAttributeDictGlobal(reader) - case 37: - return DecodeCSSInsertRule(reader) - case 38: - return DecodeCSSDeleteRule(reader) - case 39: - return DecodeFetch(reader) case 40: return DecodeProfiler(reader) case 41: @@ -2198,22 +2026,16 @@ func ReadMessage(t uint64, reader BytesReader) (Message, error) { return DecodeLoadFontFace(reader) case 58: return DecodeSetNodeFocus(reader) - case 59: - return DecodeLongTask(reader) case 60: return DecodeSetNodeAttributeURLBased(reader) case 61: return DecodeSetCSSDataURLBased(reader) - case 62: - return DecodeIssueEventDeprecated(reader) case 63: return DecodeTechnicalInfo(reader) case 64: return DecodeCustomIssue(reader) case 66: return DecodeAssetCache(reader) - case 67: - return DecodeCSSInsertRuleURLBased(reader) case 68: return DecodeMouseClick(reader) case 69: @@ -2238,8 +2060,6 @@ func ReadMessage(t uint64, reader BytesReader) (Message, error) { return DecodeJSException(reader) case 79: return DecodeZustand(reader) - case 80: - return DecodeBatchMeta(reader) case 81: return DecodeBatchMetadata(reader) case 82: diff --git a/backend/pkg/messages/reader.go b/backend/pkg/messages/reader.go index 436876e55..a72331d63 100644 --- a/backend/pkg/messages/reader.go +++ b/backend/pkg/messages/reader.go @@ -89,15 +89,13 @@ func (m *messageReaderImpl) Parse() (err error) { if err != nil { return fmt.Errorf("read message err: %s", err) } - if m.msgType == MsgBatchMeta || m.msgType == MsgBatchMetadata { + if m.msgType == MsgBatchMetadata { if len(m.list) > 0 { return fmt.Errorf("batch meta not at the start of batch") } switch message := msg.(type) { case *BatchMetadata: m.version = int(message.Version) - case *BatchMeta: - m.version = 0 } if m.version != 1 { // Unsupported tracker version, reset reader diff --git a/backend/pkg/sessions/api/web/handlers.go b/backend/pkg/sessions/api/web/handlers.go index f3530015a..4ca3fec32 100644 --- a/backend/pkg/sessions/api/web/handlers.go +++ b/backend/pkg/sessions/api/web/handlers.go @@ -79,31 +79,34 @@ func (e *handlersImpl) GetAll() []*api.Description { } } -func getSessionTimestamp(req *StartSessionRequest, startTimeMili int64) (ts uint64) { - ts = uint64(req.Timestamp) +func getSessionTimestamp(req *StartSessionRequest, startTimeMili int64) uint64 { if req.IsOffline { - return + return uint64(req.Timestamp) } - c, err := semver.NewConstraint(">=4.1.6") + ts := uint64(startTimeMili) + if req.BufferDiff > 0 && req.BufferDiff < 5*60*1000 { + ts -= req.BufferDiff + } + return ts +} + +func validateTrackerVersion(ver string) error { + c, err := semver.NewConstraint(">=6.0.0") if err != nil { - return + return err } - ver := req.TrackerVersion parts := strings.Split(ver, "-") if len(parts) > 1 { ver = parts[0] } v, err := semver.NewVersion(ver) if err != nil { - return + return err } - if c.Check(v) { - ts = uint64(startTimeMili) - if req.BufferDiff > 0 && req.BufferDiff < 5*60*1000 { - ts -= req.BufferDiff - } + if !c.Check(v) { + return errors.New("unsupported tracker version") } - return + return nil } func (e *handlersImpl) startSessionHandlerWeb(w http.ResponseWriter, r *http.Request) { @@ -132,6 +135,11 @@ func (e *handlersImpl) startSessionHandlerWeb(w http.ResponseWriter, r *http.Req // Add tracker version to context r = r.WithContext(context.WithValue(r.Context(), "tracker", req.TrackerVersion)) + if err := validateTrackerVersion(req.TrackerVersion); err != nil { + e.log.Error(r.Context(), "unsupported tracker version: %s, err: %s", req.TrackerVersion, err) + e.responser.ResponseWithError(e.log, r.Context(), w, http.StatusUpgradeRequired, errors.New("please upgrade the tracker version"), startTime, r.URL.Path, bodySize) + return + } // Handler's logic if req.ProjectKey == nil { diff --git a/ee/connectors/msgcodec/messages.py b/ee/connectors/msgcodec/messages.py index 53450583d..dfd38a369 100644 --- a/ee/connectors/msgcodec/messages.py +++ b/ee/connectors/msgcodec/messages.py @@ -35,13 +35,6 @@ class SessionStart(Message): self.user_id = user_id -class SessionEndDeprecated(Message): - __id__ = 3 - - def __init__(self, timestamp): - self.timestamp = timestamp - - class SetPageLocationDeprecated(Message): __id__ = 4 @@ -231,15 +224,6 @@ class PageRenderTiming(Message): self.time_to_interactive = time_to_interactive -class JSExceptionDeprecated(Message): - __id__ = 25 - - def __init__(self, name, message, payload): - self.name = name - self.message = message - self.payload = payload - - class IntegrationEvent(Message): __id__ = 26 @@ -339,34 +323,21 @@ class PageEvent(Message): self.web_vitals = web_vitals -class CSSInsertRule(Message): - __id__ = 37 +class StringDictGlobal(Message): + __id__ = 34 - def __init__(self, id, rule, index): + def __init__(self, key, value): + self.key = key + self.value = value + + +class SetNodeAttributeDictGlobal(Message): + __id__ = 35 + + def __init__(self, id, name, value): self.id = id - self.rule = rule - self.index = index - - -class CSSDeleteRule(Message): - __id__ = 38 - - def __init__(self, id, index): - self.id = id - self.index = index - - -class Fetch(Message): - __id__ = 39 - - def __init__(self, method, url, request, response, status, timestamp, duration): - self.method = method - self.url = url - self.request = request - self.response = response - self.status = status - self.timestamp = timestamp - self.duration = duration + self.name = name + self.value = value class Profiler(Message): @@ -549,19 +520,6 @@ class SetNodeFocus(Message): self.id = id -class LongTask(Message): - __id__ = 59 - - def __init__(self, timestamp, duration, context, container_type, container_src, container_id, container_name): - self.timestamp = timestamp - self.duration = duration - self.context = context - self.container_type = container_type - self.container_src = container_src - self.container_id = container_id - self.container_name = container_name - - class SetNodeAttributeURLBased(Message): __id__ = 60 @@ -581,18 +539,6 @@ class SetCSSDataURLBased(Message): self.base_url = base_url -class IssueEventDeprecated(Message): - __id__ = 62 - - def __init__(self, message_id, timestamp, type, context_string, context, payload): - self.message_id = message_id - self.timestamp = timestamp - self.type = type - self.context_string = context_string - self.context = context - self.payload = payload - - class TechnicalInfo(Message): __id__ = 63 @@ -616,16 +562,6 @@ class AssetCache(Message): self.url = url -class CSSInsertRuleURLBased(Message): - __id__ = 67 - - def __init__(self, id, rule, index, base_url): - self.id = id - self.rule = rule - self.index = index - self.base_url = base_url - - class MouseClick(Message): __id__ = 68 @@ -734,15 +670,6 @@ class Zustand(Message): self.state = state -class BatchMeta(Message): - __id__ = 80 - - def __init__(self, page_no, first_index, timestamp): - self.page_no = page_no - self.first_index = first_index - self.timestamp = timestamp - - class BatchMetadata(Message): __id__ = 81 diff --git a/ee/connectors/msgcodec/messages.pyx b/ee/connectors/msgcodec/messages.pyx index b07658d51..d84f4a1c5 100644 --- a/ee/connectors/msgcodec/messages.pyx +++ b/ee/connectors/msgcodec/messages.pyx @@ -58,15 +58,6 @@ cdef class SessionStart(PyMessage): self.user_id = user_id -cdef class SessionEndDeprecated(PyMessage): - cdef public int __id__ - cdef public unsigned long timestamp - - def __init__(self, unsigned long timestamp): - self.__id__ = 3 - self.timestamp = timestamp - - cdef class SetPageLocationDeprecated(PyMessage): cdef public int __id__ cdef public str url @@ -340,19 +331,6 @@ cdef class PageRenderTiming(PyMessage): self.time_to_interactive = time_to_interactive -cdef class JSExceptionDeprecated(PyMessage): - cdef public int __id__ - cdef public str name - cdef public str message - cdef public str payload - - def __init__(self, str name, str message, str payload): - self.__id__ = 25 - self.name = name - self.message = message - self.payload = payload - - cdef class IntegrationEvent(PyMessage): cdef public int __id__ cdef public unsigned long timestamp @@ -511,49 +489,28 @@ cdef class PageEvent(PyMessage): self.web_vitals = web_vitals -cdef class CSSInsertRule(PyMessage): +cdef class StringDictGlobal(PyMessage): + cdef public int __id__ + cdef public unsigned long key + cdef public str value + + def __init__(self, unsigned long key, str value): + self.__id__ = 34 + self.key = key + self.value = value + + +cdef class SetNodeAttributeDictGlobal(PyMessage): cdef public int __id__ cdef public unsigned long id - cdef public str rule - cdef public unsigned long index + cdef public unsigned long name + cdef public unsigned long value - def __init__(self, unsigned long id, str rule, unsigned long index): - self.__id__ = 37 + def __init__(self, unsigned long id, unsigned long name, unsigned long value): + self.__id__ = 35 self.id = id - self.rule = rule - self.index = index - - -cdef class CSSDeleteRule(PyMessage): - cdef public int __id__ - cdef public unsigned long id - cdef public unsigned long index - - def __init__(self, unsigned long id, unsigned long index): - self.__id__ = 38 - self.id = id - self.index = index - - -cdef class Fetch(PyMessage): - cdef public int __id__ - cdef public str method - cdef public str url - cdef public str request - cdef public str response - cdef public unsigned long status - cdef public unsigned long timestamp - cdef public unsigned long duration - - def __init__(self, str method, str url, str request, str response, unsigned long status, unsigned long timestamp, unsigned long duration): - self.__id__ = 39 - self.method = method - self.url = url - self.request = request - self.response = response - self.status = status - self.timestamp = timestamp - self.duration = duration + self.name = name + self.value = value cdef class Profiler(PyMessage): @@ -821,27 +778,6 @@ cdef class SetNodeFocus(PyMessage): self.id = id -cdef class LongTask(PyMessage): - cdef public int __id__ - cdef public unsigned long timestamp - cdef public unsigned long duration - cdef public unsigned long context - cdef public unsigned long container_type - cdef public str container_src - cdef public str container_id - cdef public str container_name - - def __init__(self, unsigned long timestamp, unsigned long duration, unsigned long context, unsigned long container_type, str container_src, str container_id, str container_name): - self.__id__ = 59 - self.timestamp = timestamp - self.duration = duration - self.context = context - self.container_type = container_type - self.container_src = container_src - self.container_id = container_id - self.container_name = container_name - - cdef class SetNodeAttributeURLBased(PyMessage): cdef public int __id__ cdef public unsigned long id @@ -870,25 +806,6 @@ cdef class SetCSSDataURLBased(PyMessage): self.base_url = base_url -cdef class IssueEventDeprecated(PyMessage): - cdef public int __id__ - cdef public unsigned long message_id - cdef public unsigned long timestamp - cdef public str type - cdef public str context_string - cdef public str context - cdef public str payload - - def __init__(self, unsigned long message_id, unsigned long timestamp, str type, str context_string, str context, str payload): - self.__id__ = 62 - self.message_id = message_id - self.timestamp = timestamp - self.type = type - self.context_string = context_string - self.context = context - self.payload = payload - - cdef class TechnicalInfo(PyMessage): cdef public int __id__ cdef public str type @@ -920,21 +837,6 @@ cdef class AssetCache(PyMessage): self.url = url -cdef class CSSInsertRuleURLBased(PyMessage): - cdef public int __id__ - cdef public unsigned long id - cdef public str rule - cdef public unsigned long index - cdef public str base_url - - def __init__(self, unsigned long id, str rule, unsigned long index, str base_url): - self.__id__ = 67 - self.id = id - self.rule = rule - self.index = index - self.base_url = base_url - - cdef class MouseClick(PyMessage): cdef public int __id__ cdef public unsigned long id @@ -1091,19 +993,6 @@ cdef class Zustand(PyMessage): self.state = state -cdef class BatchMeta(PyMessage): - cdef public int __id__ - cdef public unsigned long page_no - cdef public unsigned long first_index - cdef public long timestamp - - def __init__(self, unsigned long page_no, unsigned long first_index, long timestamp): - self.__id__ = 80 - self.page_no = page_no - self.first_index = first_index - self.timestamp = timestamp - - cdef class BatchMetadata(PyMessage): cdef public int __id__ cdef public unsigned long version diff --git a/ee/connectors/msgcodec/msgcodec.py b/ee/connectors/msgcodec/msgcodec.py index 6d771b559..7bc5a8174 100644 --- a/ee/connectors/msgcodec/msgcodec.py +++ b/ee/connectors/msgcodec/msgcodec.py @@ -118,11 +118,6 @@ class MessageCodec(Codec): user_id=self.read_string(reader) ) - if message_id == 3: - return SessionEndDeprecated( - timestamp=self.read_uint(reader) - ) - if message_id == 4: return SetPageLocationDeprecated( url=self.read_string(reader), @@ -270,13 +265,6 @@ class MessageCodec(Codec): time_to_interactive=self.read_uint(reader) ) - if message_id == 25: - return JSExceptionDeprecated( - name=self.read_string(reader), - message=self.read_string(reader), - payload=self.read_string(reader) - ) - if message_id == 26: return IntegrationEvent( timestamp=self.read_uint(reader), @@ -360,28 +348,17 @@ class MessageCodec(Codec): web_vitals=self.read_string(reader) ) - if message_id == 37: - return CSSInsertRule( - id=self.read_uint(reader), - rule=self.read_string(reader), - index=self.read_uint(reader) + if message_id == 34: + return StringDictGlobal( + key=self.read_uint(reader), + value=self.read_string(reader) ) - if message_id == 38: - return CSSDeleteRule( + if message_id == 35: + return SetNodeAttributeDictGlobal( id=self.read_uint(reader), - index=self.read_uint(reader) - ) - - if message_id == 39: - return Fetch( - method=self.read_string(reader), - url=self.read_string(reader), - request=self.read_string(reader), - response=self.read_string(reader), - status=self.read_uint(reader), - timestamp=self.read_uint(reader), - duration=self.read_uint(reader) + name=self.read_uint(reader), + value=self.read_uint(reader) ) if message_id == 40: @@ -526,17 +503,6 @@ class MessageCodec(Codec): id=self.read_int(reader) ) - if message_id == 59: - return LongTask( - timestamp=self.read_uint(reader), - duration=self.read_uint(reader), - context=self.read_uint(reader), - container_type=self.read_uint(reader), - container_src=self.read_string(reader), - container_id=self.read_string(reader), - container_name=self.read_string(reader) - ) - if message_id == 60: return SetNodeAttributeURLBased( id=self.read_uint(reader), @@ -552,16 +518,6 @@ class MessageCodec(Codec): base_url=self.read_string(reader) ) - if message_id == 62: - return IssueEventDeprecated( - message_id=self.read_uint(reader), - timestamp=self.read_uint(reader), - type=self.read_string(reader), - context_string=self.read_string(reader), - context=self.read_string(reader), - payload=self.read_string(reader) - ) - if message_id == 63: return TechnicalInfo( type=self.read_string(reader), @@ -579,14 +535,6 @@ class MessageCodec(Codec): url=self.read_string(reader) ) - if message_id == 67: - return CSSInsertRuleURLBased( - id=self.read_uint(reader), - rule=self.read_string(reader), - index=self.read_uint(reader), - base_url=self.read_string(reader) - ) - if message_id == 68: return MouseClick( id=self.read_uint(reader), @@ -671,13 +619,6 @@ class MessageCodec(Codec): state=self.read_string(reader) ) - if message_id == 80: - return BatchMeta( - page_no=self.read_uint(reader), - first_index=self.read_uint(reader), - timestamp=self.read_int(reader) - ) - if message_id == 81: return BatchMetadata( version=self.read_uint(reader), diff --git a/ee/connectors/msgcodec/msgcodec.pyx b/ee/connectors/msgcodec/msgcodec.pyx index 9055ca0d7..e53fd9224 100644 --- a/ee/connectors/msgcodec/msgcodec.pyx +++ b/ee/connectors/msgcodec/msgcodec.pyx @@ -216,11 +216,6 @@ cdef class MessageCodec: user_id=self.read_string(reader) ) - if message_id == 3: - return SessionEndDeprecated( - timestamp=self.read_uint(reader) - ) - if message_id == 4: return SetPageLocationDeprecated( url=self.read_string(reader), @@ -368,13 +363,6 @@ cdef class MessageCodec: time_to_interactive=self.read_uint(reader) ) - if message_id == 25: - return JSExceptionDeprecated( - name=self.read_string(reader), - message=self.read_string(reader), - payload=self.read_string(reader) - ) - if message_id == 26: return IntegrationEvent( timestamp=self.read_uint(reader), @@ -458,28 +446,17 @@ cdef class MessageCodec: web_vitals=self.read_string(reader) ) - if message_id == 37: - return CSSInsertRule( - id=self.read_uint(reader), - rule=self.read_string(reader), - index=self.read_uint(reader) + if message_id == 34: + return StringDictGlobal( + key=self.read_uint(reader), + value=self.read_string(reader) ) - if message_id == 38: - return CSSDeleteRule( + if message_id == 35: + return SetNodeAttributeDictGlobal( id=self.read_uint(reader), - index=self.read_uint(reader) - ) - - if message_id == 39: - return Fetch( - method=self.read_string(reader), - url=self.read_string(reader), - request=self.read_string(reader), - response=self.read_string(reader), - status=self.read_uint(reader), - timestamp=self.read_uint(reader), - duration=self.read_uint(reader) + name=self.read_uint(reader), + value=self.read_uint(reader) ) if message_id == 40: @@ -624,17 +601,6 @@ cdef class MessageCodec: id=self.read_int(reader) ) - if message_id == 59: - return LongTask( - timestamp=self.read_uint(reader), - duration=self.read_uint(reader), - context=self.read_uint(reader), - container_type=self.read_uint(reader), - container_src=self.read_string(reader), - container_id=self.read_string(reader), - container_name=self.read_string(reader) - ) - if message_id == 60: return SetNodeAttributeURLBased( id=self.read_uint(reader), @@ -650,16 +616,6 @@ cdef class MessageCodec: base_url=self.read_string(reader) ) - if message_id == 62: - return IssueEventDeprecated( - message_id=self.read_uint(reader), - timestamp=self.read_uint(reader), - type=self.read_string(reader), - context_string=self.read_string(reader), - context=self.read_string(reader), - payload=self.read_string(reader) - ) - if message_id == 63: return TechnicalInfo( type=self.read_string(reader), @@ -677,14 +633,6 @@ cdef class MessageCodec: url=self.read_string(reader) ) - if message_id == 67: - return CSSInsertRuleURLBased( - id=self.read_uint(reader), - rule=self.read_string(reader), - index=self.read_uint(reader), - base_url=self.read_string(reader) - ) - if message_id == 68: return MouseClick( id=self.read_uint(reader), @@ -769,13 +717,6 @@ cdef class MessageCodec: state=self.read_string(reader) ) - if message_id == 80: - return BatchMeta( - page_no=self.read_uint(reader), - first_index=self.read_uint(reader), - timestamp=self.read_int(reader) - ) - if message_id == 81: return BatchMetadata( version=self.read_uint(reader), diff --git a/frontend/app/player/web/messages/RawMessageReader.gen.ts b/frontend/app/player/web/messages/RawMessageReader.gen.ts index c15008535..f91b15ee9 100644 --- a/frontend/app/player/web/messages/RawMessageReader.gen.ts +++ b/frontend/app/player/web/messages/RawMessageReader.gen.ts @@ -255,48 +255,6 @@ export default class RawMessageReader extends PrimitiveReader { }; } - case 37: { - const id = this.readUint(); if (id === null) { return resetPointer() } - const rule = this.readString(); if (rule === null) { return resetPointer() } - const index = this.readUint(); if (index === null) { return resetPointer() } - return { - tp: MType.CssInsertRule, - id, - rule, - index, - }; - } - - case 38: { - const id = this.readUint(); if (id === null) { return resetPointer() } - const index = this.readUint(); if (index === null) { return resetPointer() } - return { - tp: MType.CssDeleteRule, - id, - index, - }; - } - - case 39: { - const method = this.readString(); if (method === null) { return resetPointer() } - const url = this.readString(); if (url === null) { return resetPointer() } - const request = this.readString(); if (request === null) { return resetPointer() } - const response = this.readString(); if (response === null) { return resetPointer() } - const status = this.readUint(); if (status === null) { return resetPointer() } - const timestamp = this.readUint(); if (timestamp === null) { return resetPointer() } - const duration = this.readUint(); if (duration === null) { return resetPointer() } - return { - tp: MType.Fetch, - method, - url, - request, - response, - status, - timestamp, - duration, - }; - } - case 40: { const name = this.readString(); if (name === null) { return resetPointer() } const duration = this.readUint(); if (duration === null) { return resetPointer() } @@ -501,26 +459,6 @@ export default class RawMessageReader extends PrimitiveReader { }; } - case 59: { - const timestamp = this.readUint(); if (timestamp === null) { return resetPointer() } - const duration = this.readUint(); if (duration === null) { return resetPointer() } - const context = this.readUint(); if (context === null) { return resetPointer() } - const containerType = this.readUint(); if (containerType === null) { return resetPointer() } - const containerSrc = this.readString(); if (containerSrc === null) { return resetPointer() } - const containerId = this.readString(); if (containerId === null) { return resetPointer() } - const containerName = this.readString(); if (containerName === null) { return resetPointer() } - return { - tp: MType.LongTask, - timestamp, - duration, - context, - containerType, - containerSrc, - containerId, - containerName, - }; - } - case 60: { const id = this.readUint(); if (id === null) { return resetPointer() } const name = this.readString(); if (name === null) { return resetPointer() } @@ -547,20 +485,6 @@ export default class RawMessageReader extends PrimitiveReader { }; } - case 67: { - const id = this.readUint(); if (id === null) { return resetPointer() } - const rule = this.readString(); if (rule === null) { return resetPointer() } - const index = this.readUint(); if (index === null) { return resetPointer() } - const baseURL = this.readString(); if (baseURL === null) { return resetPointer() } - return { - tp: MType.CssInsertRuleURLBased, - id, - rule, - index, - baseURL, - }; - } - case 68: { const id = this.readUint(); if (id === null) { return resetPointer() } const hesitationTime = this.readUint(); if (hesitationTime === null) { return resetPointer() } diff --git a/frontend/app/player/web/messages/filters.gen.ts b/frontend/app/player/web/messages/filters.gen.ts index 0a3d5dca7..ef69977b8 100644 --- a/frontend/app/player/web/messages/filters.gen.ts +++ b/frontend/app/player/web/messages/filters.gen.ts @@ -4,7 +4,7 @@ import { MType } from './raw.gen' const IOS_TYPES = [90,91,92,93,94,95,96,97,98,100,101,102,103,104,105,106,107,110,111] -const DOM_TYPES = [0,4,5,6,7,8,9,10,11,12,13,14,15,16,18,19,20,34,35,37,38,49,50,51,43,52,54,55,57,58,59,60,61,67,68,69,70,71,72,73,74,75,76,77,113,114,117,118,119,122] +const DOM_TYPES = [0,4,5,6,7,8,9,10,11,12,13,14,15,16,18,19,20,34,35,49,50,51,43,52,54,55,57,58,60,61,68,69,70,71,72,73,74,75,76,77,113,114,117,118,119,122] export function isDOMType(t: MType) { return DOM_TYPES.includes(t) } \ No newline at end of file diff --git a/frontend/app/player/web/messages/message.gen.ts b/frontend/app/player/web/messages/message.gen.ts index 5ccecf84e..942e9da31 100644 --- a/frontend/app/player/web/messages/message.gen.ts +++ b/frontend/app/player/web/messages/message.gen.ts @@ -25,9 +25,6 @@ import type { RawConsoleLog, RawStringDictGlobal, RawSetNodeAttributeDictGlobal, - RawCssInsertRule, - RawCssDeleteRule, - RawFetch, RawProfiler, RawOTable, RawReduxDeprecated, @@ -45,10 +42,8 @@ import type { RawSetPageVisibility, RawLoadFontFace, RawSetNodeFocus, - RawLongTask, RawSetNodeAttributeURLBased, RawSetCssDataURLBased, - RawCssInsertRuleURLBased, RawMouseClick, RawMouseClickDeprecated, RawCreateIFrameDocument, @@ -129,12 +124,6 @@ export type StringDictGlobal = RawStringDictGlobal & Timed export type SetNodeAttributeDictGlobal = RawSetNodeAttributeDictGlobal & Timed -export type CssInsertRule = RawCssInsertRule & Timed - -export type CssDeleteRule = RawCssDeleteRule & Timed - -export type Fetch = RawFetch & Timed - export type Profiler = RawProfiler & Timed export type OTable = RawOTable & Timed @@ -169,14 +158,10 @@ export type LoadFontFace = RawLoadFontFace & Timed export type SetNodeFocus = RawSetNodeFocus & Timed -export type LongTask = RawLongTask & Timed - export type SetNodeAttributeURLBased = RawSetNodeAttributeURLBased & Timed export type SetCssDataURLBased = RawSetCssDataURLBased & Timed -export type CssInsertRuleURLBased = RawCssInsertRuleURLBased & Timed - export type MouseClick = RawMouseClick & Timed export type MouseClickDeprecated = RawMouseClickDeprecated & Timed diff --git a/frontend/app/player/web/messages/raw.gen.ts b/frontend/app/player/web/messages/raw.gen.ts index bb8e83003..67a5660dd 100644 --- a/frontend/app/player/web/messages/raw.gen.ts +++ b/frontend/app/player/web/messages/raw.gen.ts @@ -23,9 +23,6 @@ export const enum MType { ConsoleLog = 22, StringDictGlobal = 34, SetNodeAttributeDictGlobal = 35, - CssInsertRule = 37, - CssDeleteRule = 38, - Fetch = 39, Profiler = 40, OTable = 41, ReduxDeprecated = 44, @@ -43,10 +40,8 @@ export const enum MType { SetPageVisibility = 55, LoadFontFace = 57, SetNodeFocus = 58, - LongTask = 59, SetNodeAttributeURLBased = 60, SetCssDataURLBased = 61, - CssInsertRuleURLBased = 67, MouseClick = 68, MouseClickDeprecated = 69, CreateIFrameDocument = 70, @@ -222,30 +217,6 @@ export interface RawSetNodeAttributeDictGlobal { value: number, } -export interface RawCssInsertRule { - tp: MType.CssInsertRule, - id: number, - rule: string, - index: number, -} - -export interface RawCssDeleteRule { - tp: MType.CssDeleteRule, - id: number, - index: number, -} - -export interface RawFetch { - tp: MType.Fetch, - method: string, - url: string, - request: string, - response: string, - status: number, - timestamp: number, - duration: number, -} - export interface RawProfiler { tp: MType.Profiler, name: string, @@ -365,17 +336,6 @@ export interface RawSetNodeFocus { id: number, } -export interface RawLongTask { - tp: MType.LongTask, - timestamp: number, - duration: number, - context: number, - containerType: number, - containerSrc: string, - containerId: string, - containerName: string, -} - export interface RawSetNodeAttributeURLBased { tp: MType.SetNodeAttributeURLBased, id: number, @@ -391,14 +351,6 @@ export interface RawSetCssDataURLBased { baseURL: string, } -export interface RawCssInsertRuleURLBased { - tp: MType.CssInsertRuleURLBased, - id: number, - rule: string, - index: number, - baseURL: string, -} - export interface RawMouseClick { tp: MType.MouseClick, id: number, @@ -662,4 +614,4 @@ export interface RawMobileIssueEvent { } -export type RawMessage = RawTimestamp | RawSetPageLocationDeprecated | RawSetViewportSize | RawSetViewportScroll | RawCreateDocument | RawCreateElementNode | RawCreateTextNode | RawMoveNode | RawRemoveNode | RawSetNodeAttribute | RawRemoveNodeAttribute | RawSetNodeData | RawSetCssData | RawSetNodeScroll | RawSetInputValue | RawSetInputChecked | RawMouseMove | RawNetworkRequestDeprecated | RawConsoleLog | RawStringDictGlobal | RawSetNodeAttributeDictGlobal | RawCssInsertRule | RawCssDeleteRule | RawFetch | RawProfiler | RawOTable | RawReduxDeprecated | RawVuex | RawMobX | RawNgRx | RawGraphQlDeprecated | RawPerformanceTrack | RawStringDictDeprecated | RawSetNodeAttributeDictDeprecated | RawStringDict | RawSetNodeAttributeDict | RawResourceTimingDeprecated | RawConnectionInformation | RawSetPageVisibility | RawLoadFontFace | RawSetNodeFocus | RawLongTask | RawSetNodeAttributeURLBased | RawSetCssDataURLBased | RawCssInsertRuleURLBased | RawMouseClick | RawMouseClickDeprecated | RawCreateIFrameDocument | RawAdoptedSsReplaceURLBased | RawAdoptedSsReplace | RawAdoptedSsInsertRuleURLBased | RawAdoptedSsInsertRule | RawAdoptedSsDeleteRule | RawAdoptedSsAddOwner | RawAdoptedSsRemoveOwner | RawZustand | RawNetworkRequest | RawWsChannel | RawSelectionChange | RawMouseThrashing | RawResourceTiming | RawTabChange | RawTabData | RawCanvasNode | RawTagTrigger | RawRedux | RawSetPageLocation | RawGraphQl | RawMobileEvent | RawMobileScreenChanges | RawMobileClickEvent | RawMobileInputEvent | RawMobilePerformanceEvent | RawMobileLog | RawMobileInternalError | RawMobileNetworkCall | RawMobileSwipeEvent | RawMobileIssueEvent; +export type RawMessage = RawTimestamp | RawSetPageLocationDeprecated | RawSetViewportSize | RawSetViewportScroll | RawCreateDocument | RawCreateElementNode | RawCreateTextNode | RawMoveNode | RawRemoveNode | RawSetNodeAttribute | RawRemoveNodeAttribute | RawSetNodeData | RawSetCssData | RawSetNodeScroll | RawSetInputValue | RawSetInputChecked | RawMouseMove | RawNetworkRequestDeprecated | RawConsoleLog | RawStringDictGlobal | RawSetNodeAttributeDictGlobal | RawProfiler | RawOTable | RawReduxDeprecated | RawVuex | RawMobX | RawNgRx | RawGraphQlDeprecated | RawPerformanceTrack | RawStringDictDeprecated | RawSetNodeAttributeDictDeprecated | RawStringDict | RawSetNodeAttributeDict | RawResourceTimingDeprecated | RawConnectionInformation | RawSetPageVisibility | RawLoadFontFace | RawSetNodeFocus | RawSetNodeAttributeURLBased | RawSetCssDataURLBased | RawMouseClick | RawMouseClickDeprecated | RawCreateIFrameDocument | RawAdoptedSsReplaceURLBased | RawAdoptedSsReplace | RawAdoptedSsInsertRuleURLBased | RawAdoptedSsInsertRule | RawAdoptedSsDeleteRule | RawAdoptedSsAddOwner | RawAdoptedSsRemoveOwner | RawZustand | RawNetworkRequest | RawWsChannel | RawSelectionChange | RawMouseThrashing | RawResourceTiming | RawTabChange | RawTabData | RawCanvasNode | RawTagTrigger | RawRedux | RawSetPageLocation | RawGraphQl | RawMobileEvent | RawMobileScreenChanges | RawMobileClickEvent | RawMobileInputEvent | RawMobilePerformanceEvent | RawMobileLog | RawMobileInternalError | RawMobileNetworkCall | RawMobileSwipeEvent | RawMobileIssueEvent; diff --git a/frontend/app/player/web/messages/tracker-legacy.gen.ts b/frontend/app/player/web/messages/tracker-legacy.gen.ts index 82bbc4be5..457a1c053 100644 --- a/frontend/app/player/web/messages/tracker-legacy.gen.ts +++ b/frontend/app/player/web/messages/tracker-legacy.gen.ts @@ -24,9 +24,6 @@ export const TP_MAP = { 22: MType.ConsoleLog, 34: MType.StringDictGlobal, 35: MType.SetNodeAttributeDictGlobal, - 37: MType.CssInsertRule, - 38: MType.CssDeleteRule, - 39: MType.Fetch, 40: MType.Profiler, 41: MType.OTable, 44: MType.ReduxDeprecated, @@ -44,10 +41,8 @@ export const TP_MAP = { 55: MType.SetPageVisibility, 57: MType.LoadFontFace, 58: MType.SetNodeFocus, - 59: MType.LongTask, 60: MType.SetNodeAttributeURLBased, 61: MType.SetCssDataURLBased, - 67: MType.CssInsertRuleURLBased, 68: MType.MouseClick, 69: MType.MouseClickDeprecated, 70: MType.CreateIFrameDocument, diff --git a/frontend/app/player/web/messages/tracker.gen.ts b/frontend/app/player/web/messages/tracker.gen.ts index 571ae9d71..fc9e7b413 100644 --- a/frontend/app/player/web/messages/tracker.gen.ts +++ b/frontend/app/player/web/messages/tracker.gen.ts @@ -186,30 +186,6 @@ type TrSetNodeAttributeDictGlobal = [ value: number, ] -type TrCSSInsertRule = [ - type: 37, - id: number, - rule: string, - index: number, -] - -type TrCSSDeleteRule = [ - type: 38, - id: number, - index: number, -] - -type TrFetch = [ - type: 39, - method: string, - url: string, - request: string, - response: string, - status: number, - timestamp: number, - duration: number, -] - type TrProfiler = [ type: 40, name: string, @@ -334,17 +310,6 @@ type TrSetNodeFocus = [ id: number, ] -type TrLongTask = [ - type: 59, - timestamp: number, - duration: number, - context: number, - containerType: number, - containerSrc: string, - containerId: string, - containerName: string, -] - type TrSetNodeAttributeURLBased = [ type: 60, id: number, @@ -372,14 +337,6 @@ type TrCustomIssue = [ payload: string, ] -type TrCSSInsertRuleURLBased = [ - type: 67, - id: number, - rule: string, - index: number, - baseURL: string, -] - type TrMouseClick = [ type: 68, id: number, @@ -583,7 +540,7 @@ type TrWebVitals = [ ] -export type TrackerMessage = TrTimestamp | TrSetPageLocationDeprecated | TrSetViewportSize | TrSetViewportScroll | TrCreateDocument | TrCreateElementNode | TrCreateTextNode | TrMoveNode | TrRemoveNode | TrSetNodeAttribute | TrRemoveNodeAttribute | TrSetNodeData | TrSetNodeScroll | TrSetInputTarget | TrSetInputValue | TrSetInputChecked | TrMouseMove | TrNetworkRequestDeprecated | TrConsoleLog | TrPageLoadTiming | TrPageRenderTiming | TrCustomEvent | TrUserID | TrUserAnonymousID | TrMetadata | TrStringDictGlobal | TrSetNodeAttributeDictGlobal | TrCSSInsertRule | TrCSSDeleteRule | TrFetch | TrProfiler | TrOTable | TrStateAction | TrReduxDeprecated | TrVuex | TrMobX | TrNgRx | TrGraphQLDeprecated | TrPerformanceTrack | TrStringDictDeprecated | TrSetNodeAttributeDictDeprecated | TrStringDict | TrSetNodeAttributeDict | TrResourceTimingDeprecated | TrConnectionInformation | TrSetPageVisibility | TrLoadFontFace | TrSetNodeFocus | TrLongTask | TrSetNodeAttributeURLBased | TrSetCSSDataURLBased | TrTechnicalInfo | TrCustomIssue | TrCSSInsertRuleURLBased | TrMouseClick | TrMouseClickDeprecated | TrCreateIFrameDocument | TrAdoptedSSReplaceURLBased | TrAdoptedSSInsertRuleURLBased | TrAdoptedSSDeleteRule | TrAdoptedSSAddOwner | TrAdoptedSSRemoveOwner | TrJSException | TrZustand | TrBatchMetadata | TrPartitionedMessage | TrNetworkRequest | TrWSChannel | TrInputChange | TrSelectionChange | TrMouseThrashing | TrUnbindNodes | TrResourceTiming | TrTabChange | TrTabData | TrCanvasNode | TrTagTrigger | TrRedux | TrSetPageLocation | TrGraphQL | TrWebVitals +export type TrackerMessage = TrTimestamp | TrSetPageLocationDeprecated | TrSetViewportSize | TrSetViewportScroll | TrCreateDocument | TrCreateElementNode | TrCreateTextNode | TrMoveNode | TrRemoveNode | TrSetNodeAttribute | TrRemoveNodeAttribute | TrSetNodeData | TrSetNodeScroll | TrSetInputTarget | TrSetInputValue | TrSetInputChecked | TrMouseMove | TrNetworkRequestDeprecated | TrConsoleLog | TrPageLoadTiming | TrPageRenderTiming | TrCustomEvent | TrUserID | TrUserAnonymousID | TrMetadata | TrStringDictGlobal | TrSetNodeAttributeDictGlobal | TrProfiler | TrOTable | TrStateAction | TrReduxDeprecated | TrVuex | TrMobX | TrNgRx | TrGraphQLDeprecated | TrPerformanceTrack | TrStringDictDeprecated | TrSetNodeAttributeDictDeprecated | TrStringDict | TrSetNodeAttributeDict | TrResourceTimingDeprecated | TrConnectionInformation | TrSetPageVisibility | TrLoadFontFace | TrSetNodeFocus | TrSetNodeAttributeURLBased | TrSetCSSDataURLBased | TrTechnicalInfo | TrCustomIssue | TrMouseClick | TrMouseClickDeprecated | TrCreateIFrameDocument | TrAdoptedSSReplaceURLBased | TrAdoptedSSInsertRuleURLBased | TrAdoptedSSDeleteRule | TrAdoptedSSAddOwner | TrAdoptedSSRemoveOwner | TrJSException | TrZustand | TrBatchMetadata | TrPartitionedMessage | TrNetworkRequest | TrWSChannel | TrInputChange | TrSelectionChange | TrMouseThrashing | TrUnbindNodes | TrResourceTiming | TrTabChange | TrTabData | TrCanvasNode | TrTagTrigger | TrRedux | TrSetPageLocation | TrGraphQL | TrWebVitals export default function translate(tMsg: TrackerMessage): RawMessage | null { switch(tMsg[0]) { @@ -761,36 +718,6 @@ export default function translate(tMsg: TrackerMessage): RawMessage | null { } } - case 37: { - return { - tp: MType.CssInsertRule, - id: tMsg[1], - rule: tMsg[2], - index: tMsg[3], - } - } - - case 38: { - return { - tp: MType.CssDeleteRule, - id: tMsg[1], - index: tMsg[2], - } - } - - case 39: { - return { - tp: MType.Fetch, - method: tMsg[1], - url: tMsg[2], - request: tMsg[3], - response: tMsg[4], - status: tMsg[5], - timestamp: tMsg[6], - duration: tMsg[7], - } - } - case 40: { return { tp: MType.Profiler, @@ -944,19 +871,6 @@ export default function translate(tMsg: TrackerMessage): RawMessage | null { } } - case 59: { - return { - tp: MType.LongTask, - timestamp: tMsg[1], - duration: tMsg[2], - context: tMsg[3], - containerType: tMsg[4], - containerSrc: tMsg[5], - containerId: tMsg[6], - containerName: tMsg[7], - } - } - case 60: { return { tp: MType.SetNodeAttributeURLBased, @@ -976,16 +890,6 @@ export default function translate(tMsg: TrackerMessage): RawMessage | null { } } - case 67: { - return { - tp: MType.CssInsertRuleURLBased, - id: tMsg[1], - rule: tMsg[2], - index: tMsg[3], - baseURL: tMsg[4], - } - } - case 68: { return { tp: MType.MouseClick, diff --git a/mobs/messages.rb b/mobs/messages.rb index 3f9dfc827..ebf4fe378 100644 --- a/mobs/messages.rb +++ b/mobs/messages.rb @@ -22,11 +22,6 @@ message 1, 'SessionStart', :tracker => false, :replayer => false do string 'UserID' end -# DEPRECATED; backend only (TODO: remove in the next release) -message 3, 'SessionEndDeprecated', :tracker => false, :replayer => false do - uint 'Timestamp' -end - # DEPRECATED since 14.0.0 -> goto 122 message 4, 'SetPageLocationDeprecated' do string 'URL' @@ -134,12 +129,6 @@ message 24, 'PageRenderTiming', :replayer => false do uint 'VisuallyComplete' uint 'TimeToInteractive' end -# DEPRECATED since 4.1.6 / 1.8.2 in favor of #78 -message 25, 'JSExceptionDeprecated', :replayer => false, :tracker => false do - string 'Name' - string 'Message' - string 'Payload' -end message 26, 'IntegrationEvent', :tracker => false, :replayer => false do uint 'Timestamp' string 'Source' @@ -219,29 +208,6 @@ message 35, 'SetNodeAttributeDictGlobal' do uint 'Name' uint 'Value' end - -# DEPRECATED since 4.0.2 in favor of AdoptedSSInsertRule + AdoptedSSAddOwner -message 37, 'CSSInsertRule' do - uint 'ID' - string 'Rule' - uint 'Index' -end -# DEPRECATED since 4.0.2 -message 38, 'CSSDeleteRule' do - uint 'ID' - uint 'Index' -end - -# DEPRECATED since 4.1.10 in favor of NetworkRequest -message 39, 'Fetch', :replayer => :devtools do - string 'Method' - string 'URL' - string 'Request' - string 'Response' - uint 'Status' - uint 'Timestamp' - uint 'Duration' -end message 40, 'Profiler', :replayer => :devtools do string 'Name' uint 'Duration' @@ -342,9 +308,8 @@ message 56, 'PerformanceTrackAggr', :tracker => false, :replayer => false do uint 'AvgUsedJSHeapSize' uint 'MaxUsedJSHeapSize' end - # Since 4.1.7 / 1.9.0 -message 57, 'LoadFontFace' do +message 57, 'LoadFontFace' do uint 'ParentID' string 'Family' string 'Source' @@ -354,17 +319,6 @@ end message 58, 'SetNodeFocus' do int 'ID' end - -#DEPRECATED (since 3.0.?) -message 59, 'LongTask' do - uint 'Timestamp' - uint 'Duration' - uint 'Context' - uint 'ContainerType' - string 'ContainerSrc' - string 'ContainerId' - string 'ContainerName' -end message 60, 'SetNodeAttributeURLBased' do uint 'ID' string 'Name' @@ -377,15 +331,6 @@ message 61, 'SetCSSDataURLBased' do string 'Data' string 'BaseURL' end -# DEPRECATED; backend only (TODO: remove in the next release) -message 62, 'IssueEventDeprecated', :replayer => false, :tracker => false do - uint 'MessageID' - uint 'Timestamp' - string 'Type' - string 'ContextString' - string 'Context' - string 'Payload' -end message 63, 'TechnicalInfo', :replayer => false do string 'Type' string 'Value' @@ -398,13 +343,6 @@ end message 66, 'AssetCache', :replayer => false, :tracker => false do string 'URL' end -message 67, 'CSSInsertRuleURLBased' do - uint 'ID' - string 'Rule' - uint 'Index' - string 'BaseURL' -end - message 68, 'MouseClick' do uint 'ID' uint 'HesitationTime' @@ -413,7 +351,6 @@ message 68, 'MouseClick' do uint 'NormalizedX' uint 'NormalizedY' end - message 69, 'MouseClickDeprecated' do uint 'ID' uint 'HesitationTime' @@ -477,13 +414,6 @@ end # Special one for Batch Metadata. Message id could define the version -# DEPRECATED since tracker 3.6.0 in favor of BatchMetadata -message 80, 'BatchMeta', :replayer => false, :tracker => false do - uint 'PageNo' - uint 'FirstIndex' - int 'Timestamp' -end - # since tracker 3.6.0 TODO: for webworker only message 81, 'BatchMetadata', :replayer => false do uint 'Version' diff --git a/tracker/tracker/src/common/messages.gen.ts b/tracker/tracker/src/common/messages.gen.ts index 0911a99b4..3921f97a6 100644 --- a/tracker/tracker/src/common/messages.gen.ts +++ b/tracker/tracker/src/common/messages.gen.ts @@ -29,9 +29,6 @@ export declare const enum Type { Metadata = 30, StringDictGlobal = 34, SetNodeAttributeDictGlobal = 35, - CSSInsertRule = 37, - CSSDeleteRule = 38, - Fetch = 39, Profiler = 40, OTable = 41, StateAction = 42, @@ -50,12 +47,10 @@ export declare const enum Type { SetPageVisibility = 55, LoadFontFace = 57, SetNodeFocus = 58, - LongTask = 59, SetNodeAttributeURLBased = 60, SetCSSDataURLBased = 61, TechnicalInfo = 63, CustomIssue = 64, - CSSInsertRuleURLBased = 67, MouseClick = 68, MouseClickDeprecated = 69, CreateIFrameDocument = 70, @@ -267,30 +262,6 @@ export type SetNodeAttributeDictGlobal = [ /*value:*/ number, ] -export type CSSInsertRule = [ - /*type:*/ Type.CSSInsertRule, - /*id:*/ number, - /*rule:*/ string, - /*index:*/ number, -] - -export type CSSDeleteRule = [ - /*type:*/ Type.CSSDeleteRule, - /*id:*/ number, - /*index:*/ number, -] - -export type Fetch = [ - /*type:*/ Type.Fetch, - /*method:*/ string, - /*url:*/ string, - /*request:*/ string, - /*response:*/ string, - /*status:*/ number, - /*timestamp:*/ number, - /*duration:*/ number, -] - export type Profiler = [ /*type:*/ Type.Profiler, /*name:*/ string, @@ -415,17 +386,6 @@ export type SetNodeFocus = [ /*id:*/ number, ] -export type LongTask = [ - /*type:*/ Type.LongTask, - /*timestamp:*/ number, - /*duration:*/ number, - /*context:*/ number, - /*containerType:*/ number, - /*containerSrc:*/ string, - /*containerId:*/ string, - /*containerName:*/ string, -] - export type SetNodeAttributeURLBased = [ /*type:*/ Type.SetNodeAttributeURLBased, /*id:*/ number, @@ -453,14 +413,6 @@ export type CustomIssue = [ /*payload:*/ string, ] -export type CSSInsertRuleURLBased = [ - /*type:*/ Type.CSSInsertRuleURLBased, - /*id:*/ number, - /*rule:*/ string, - /*index:*/ number, - /*baseURL:*/ string, -] - export type MouseClick = [ /*type:*/ Type.MouseClick, /*id:*/ number, @@ -664,5 +616,5 @@ export type WebVitals = [ ] -type Message = Timestamp | SetPageLocationDeprecated | SetViewportSize | SetViewportScroll | CreateDocument | CreateElementNode | CreateTextNode | MoveNode | RemoveNode | SetNodeAttribute | RemoveNodeAttribute | SetNodeData | SetNodeScroll | SetInputTarget | SetInputValue | SetInputChecked | MouseMove | NetworkRequestDeprecated | ConsoleLog | PageLoadTiming | PageRenderTiming | CustomEvent | UserID | UserAnonymousID | Metadata | StringDictGlobal | SetNodeAttributeDictGlobal | CSSInsertRule | CSSDeleteRule | Fetch | Profiler | OTable | StateAction | ReduxDeprecated | Vuex | MobX | NgRx | GraphQLDeprecated | PerformanceTrack | StringDictDeprecated | SetNodeAttributeDictDeprecated | StringDict | SetNodeAttributeDict | ResourceTimingDeprecated | ConnectionInformation | SetPageVisibility | LoadFontFace | SetNodeFocus | LongTask | SetNodeAttributeURLBased | SetCSSDataURLBased | TechnicalInfo | CustomIssue | CSSInsertRuleURLBased | MouseClick | MouseClickDeprecated | CreateIFrameDocument | AdoptedSSReplaceURLBased | AdoptedSSInsertRuleURLBased | AdoptedSSDeleteRule | AdoptedSSAddOwner | AdoptedSSRemoveOwner | JSException | Zustand | BatchMetadata | PartitionedMessage | NetworkRequest | WSChannel | InputChange | SelectionChange | MouseThrashing | UnbindNodes | ResourceTiming | TabChange | TabData | CanvasNode | TagTrigger | Redux | SetPageLocation | GraphQL | WebVitals +type Message = Timestamp | SetPageLocationDeprecated | SetViewportSize | SetViewportScroll | CreateDocument | CreateElementNode | CreateTextNode | MoveNode | RemoveNode | SetNodeAttribute | RemoveNodeAttribute | SetNodeData | SetNodeScroll | SetInputTarget | SetInputValue | SetInputChecked | MouseMove | NetworkRequestDeprecated | ConsoleLog | PageLoadTiming | PageRenderTiming | CustomEvent | UserID | UserAnonymousID | Metadata | StringDictGlobal | SetNodeAttributeDictGlobal | Profiler | OTable | StateAction | ReduxDeprecated | Vuex | MobX | NgRx | GraphQLDeprecated | PerformanceTrack | StringDictDeprecated | SetNodeAttributeDictDeprecated | StringDict | SetNodeAttributeDict | ResourceTimingDeprecated | ConnectionInformation | SetPageVisibility | LoadFontFace | SetNodeFocus | SetNodeAttributeURLBased | SetCSSDataURLBased | TechnicalInfo | CustomIssue | MouseClick | MouseClickDeprecated | CreateIFrameDocument | AdoptedSSReplaceURLBased | AdoptedSSInsertRuleURLBased | AdoptedSSDeleteRule | AdoptedSSAddOwner | AdoptedSSRemoveOwner | JSException | Zustand | BatchMetadata | PartitionedMessage | NetworkRequest | WSChannel | InputChange | SelectionChange | MouseThrashing | UnbindNodes | ResourceTiming | TabChange | TabData | CanvasNode | TagTrigger | Redux | SetPageLocation | GraphQL | WebVitals export default Message diff --git a/tracker/tracker/src/main/app/messages.gen.ts b/tracker/tracker/src/main/app/messages.gen.ts index ca9a88118..ae21e3b9a 100644 --- a/tracker/tracker/src/main/app/messages.gen.ts +++ b/tracker/tracker/src/main/app/messages.gen.ts @@ -340,51 +340,6 @@ export function SetNodeAttributeDictGlobal( ] } -export function CSSInsertRule( - id: number, - rule: string, - index: number, -): Messages.CSSInsertRule { - return [ - Messages.Type.CSSInsertRule, - id, - rule, - index, - ] -} - -export function CSSDeleteRule( - id: number, - index: number, -): Messages.CSSDeleteRule { - return [ - Messages.Type.CSSDeleteRule, - id, - index, - ] -} - -export function Fetch( - method: string, - url: string, - request: string, - response: string, - status: number, - timestamp: number, - duration: number, -): Messages.Fetch { - return [ - Messages.Type.Fetch, - method, - url, - request, - response, - status, - timestamp, - duration, - ] -} - export function Profiler( name: string, duration: number, @@ -615,27 +570,6 @@ export function SetNodeFocus( ] } -export function LongTask( - timestamp: number, - duration: number, - context: number, - containerType: number, - containerSrc: string, - containerId: string, - containerName: string, -): Messages.LongTask { - return [ - Messages.Type.LongTask, - timestamp, - duration, - context, - containerType, - containerSrc, - containerId, - containerName, - ] -} - export function SetNodeAttributeURLBased( id: number, name: string, @@ -686,21 +620,6 @@ export function CustomIssue( ] } -export function CSSInsertRuleURLBased( - id: number, - rule: string, - index: number, - baseURL: string, -): Messages.CSSInsertRuleURLBased { - return [ - Messages.Type.CSSInsertRuleURLBased, - id, - rule, - index, - baseURL, - ] -} - export function MouseClick( id: number, hesitationTime: number, diff --git a/tracker/tracker/src/webworker/MessageEncoder.gen.ts b/tracker/tracker/src/webworker/MessageEncoder.gen.ts index cd8a2b5d3..88e13eb25 100644 --- a/tracker/tracker/src/webworker/MessageEncoder.gen.ts +++ b/tracker/tracker/src/webworker/MessageEncoder.gen.ts @@ -118,18 +118,6 @@ export default class MessageEncoder extends PrimitiveEncoder { return this.uint(msg[1]) && this.uint(msg[2]) && this.uint(msg[3]) break - case Messages.Type.CSSInsertRule: - return this.uint(msg[1]) && this.string(msg[2]) && this.uint(msg[3]) - break - - case Messages.Type.CSSDeleteRule: - return this.uint(msg[1]) && this.uint(msg[2]) - break - - case Messages.Type.Fetch: - return this.string(msg[1]) && this.string(msg[2]) && this.string(msg[3]) && this.string(msg[4]) && this.uint(msg[5]) && this.uint(msg[6]) && this.uint(msg[7]) - break - case Messages.Type.Profiler: return this.string(msg[1]) && this.uint(msg[2]) && this.string(msg[3]) && this.string(msg[4]) break @@ -202,10 +190,6 @@ export default class MessageEncoder extends PrimitiveEncoder { return this.int(msg[1]) break - case Messages.Type.LongTask: - return this.uint(msg[1]) && this.uint(msg[2]) && this.uint(msg[3]) && this.uint(msg[4]) && this.string(msg[5]) && this.string(msg[6]) && this.string(msg[7]) - break - case Messages.Type.SetNodeAttributeURLBased: return this.uint(msg[1]) && this.string(msg[2]) && this.string(msg[3]) && this.string(msg[4]) break @@ -222,10 +206,6 @@ export default class MessageEncoder extends PrimitiveEncoder { return this.string(msg[1]) && this.string(msg[2]) break - case Messages.Type.CSSInsertRuleURLBased: - return this.uint(msg[1]) && this.string(msg[2]) && this.uint(msg[3]) && this.string(msg[4]) - break - case Messages.Type.MouseClick: return this.uint(msg[1]) && this.uint(msg[2]) && this.string(msg[3]) && this.string(msg[4]) && this.uint(msg[5]) && this.uint(msg[6]) break