From e861bd964148bbb53cd686aadfad43af520efcc1 Mon Sep 17 00:00:00 2001 From: Alex K Date: Tue, 6 Dec 2022 11:54:36 +0100 Subject: [PATCH] refactor(backend):remove legacy message wrapping (#854) * refactor(backend):remove legacy message wrapping & few backend-only messages --- backend/cmd/db/main.go | 2 +- backend/internal/db/datasaver/fts.go | 25 +- backend/internal/db/datasaver/messages.go | 8 +- backend/pkg/db/cache/messages-web.go | 8 +- backend/pkg/db/postgres/connector.go | 8 +- backend/pkg/db/postgres/messages-web.go | 18 +- backend/pkg/handlers/custom/eventMapper.go | 33 - backend/pkg/messages/filters.go | 4 +- backend/pkg/messages/messages.go | 831 ++++++++---------- backend/pkg/messages/read-message.go | 101 +-- ee/backend/internal/db/datasaver/messages.go | 8 +- ee/backend/pkg/db/clickhouse/connector.go | 20 +- ee/connectors/msgcodec/messages.py | 47 +- ee/connectors/msgcodec/msgcodec.py | 39 +- .../app/player/web/messages/tracker.gen.ts | 4 +- mobs/messages.rb | 73 +- .../backend~pkg~messages~read-message.go.erb | 1 - tracker/tracker/src/common/messages.gen.ts | 8 +- tracker/tracker/src/main/app/messages.gen.ts | 6 +- .../src/webworker/MessageEncoder.gen.ts | 2 +- 20 files changed, 450 insertions(+), 796 deletions(-) diff --git a/backend/cmd/db/main.go b/backend/cmd/db/main.go index 8db029394..d22b7b363 100644 --- a/backend/cmd/db/main.go +++ b/backend/cmd/db/main.go @@ -62,7 +62,7 @@ func main() { messages.MsgUserID, messages.MsgUserAnonymousID, messages.MsgClickEvent, messages.MsgIntegrationEvent, messages.MsgPerformanceTrackAggr, messages.MsgJSException, messages.MsgResourceTiming, - messages.MsgRawCustomEvent, messages.MsgCustomIssue, messages.MsgFetch, messages.MsgGraphQL, + messages.MsgCustomEvent, messages.MsgCustomIssue, messages.MsgFetch, messages.MsgGraphQL, messages.MsgStateAction, messages.MsgSetInputTarget, messages.MsgSetInputValue, messages.MsgCreateDocument, messages.MsgMouseClick, messages.MsgSetPageLocation, messages.MsgPageLoadTiming, messages.MsgPageRenderTiming} diff --git a/backend/internal/db/datasaver/fts.go b/backend/internal/db/datasaver/fts.go index c0250c4d2..afdb3ca39 100644 --- a/backend/internal/db/datasaver/fts.go +++ b/backend/internal/db/datasaver/fts.go @@ -6,7 +6,7 @@ import ( "openreplay/backend/pkg/messages" ) -type FetchEventFTS struct { +type FetchFTS struct { Method string `json:"method"` URL string `json:"url"` Request string `json:"request"` @@ -36,7 +36,7 @@ type PageEventFTS struct { TimeToInteractive uint64 `json:"time_to_interactive"` } -type GraphQLEventFTS struct { +type GraphQLFTS struct { OperationKind string `json:"operation_kind"` OperationName string `json:"operation_name"` Variables string `json:"variables"` @@ -57,17 +57,7 @@ func (s *Saver) sendToFTS(msg messages.Message, sessionID uint64) { switch m := msg.(type) { // Common case *messages.Fetch: - event, err = json.Marshal(FetchEventFTS{ - Method: m.Method, - URL: m.URL, - Request: m.Request, - Response: m.Response, - Status: m.Status, - Timestamp: m.Timestamp, - Duration: m.Duration, - }) - case *messages.FetchEvent: - event, err = json.Marshal(FetchEventFTS{ + event, err = json.Marshal(FetchFTS{ Method: m.Method, URL: m.URL, Request: m.Request, @@ -97,14 +87,7 @@ func (s *Saver) sendToFTS(msg messages.Message, sessionID uint64) { TimeToInteractive: m.TimeToInteractive, }) case *messages.GraphQL: - event, err = json.Marshal(GraphQLEventFTS{ - OperationKind: m.OperationKind, - OperationName: m.OperationName, - Variables: m.Variables, - Response: m.Response, - }) - case *messages.GraphQLEvent: - event, err = json.Marshal(GraphQLEventFTS{ + event, err = json.Marshal(GraphQLFTS{ OperationKind: m.OperationKind, OperationName: m.OperationName, Variables: m.Variables, diff --git a/backend/internal/db/datasaver/messages.go b/backend/internal/db/datasaver/messages.go index 621659c6d..b07eb7c0d 100644 --- a/backend/internal/db/datasaver/messages.go +++ b/backend/internal/db/datasaver/messages.go @@ -38,12 +38,12 @@ func (mi *Saver) InsertMessage(msg Message) error { case *PageEvent: mi.sendToFTS(msg, sessionID) return mi.pg.InsertWebPageEvent(sessionID, m) - case *FetchEvent: + case *Fetch: mi.sendToFTS(msg, sessionID) - return mi.pg.InsertWebFetchEvent(sessionID, m) - case *GraphQLEvent: + return mi.pg.InsertWebFetch(sessionID, m) + case *GraphQL: mi.sendToFTS(msg, sessionID) - return mi.pg.InsertWebGraphQLEvent(sessionID, m) + return mi.pg.InsertWebGraphQL(sessionID, m) case *JSException: return mi.pg.InsertWebJSException(m) case *IntegrationEvent: diff --git a/backend/pkg/db/cache/messages-web.go b/backend/pkg/db/cache/messages-web.go index 931d1f639..55588c245 100644 --- a/backend/pkg/db/cache/messages-web.go +++ b/backend/pkg/db/cache/messages-web.go @@ -99,7 +99,7 @@ func (c *PGCache) InsertSessionReferrer(sessionID uint64, referrer string) error return c.Conn.InsertSessionReferrer(sessionID, referrer) } -func (c *PGCache) InsertWebFetchEvent(sessionID uint64, e *FetchEvent) error { +func (c *PGCache) InsertWebFetch(sessionID uint64, e *Fetch) error { session, err := c.Cache.GetSession(sessionID) if err != nil { return err @@ -108,10 +108,10 @@ func (c *PGCache) InsertWebFetchEvent(sessionID uint64, e *FetchEvent) error { if err != nil { return err } - return c.Conn.InsertWebFetchEvent(sessionID, session.ProjectID, project.SaveRequestPayloads, e) + return c.Conn.InsertWebFetch(sessionID, session.ProjectID, project.SaveRequestPayloads, e) } -func (c *PGCache) InsertWebGraphQLEvent(sessionID uint64, e *GraphQLEvent) error { +func (c *PGCache) InsertWebGraphQL(sessionID uint64, e *GraphQL) error { session, err := c.Cache.GetSession(sessionID) if err != nil { return err @@ -120,7 +120,7 @@ func (c *PGCache) InsertWebGraphQLEvent(sessionID uint64, e *GraphQLEvent) error if err != nil { return err } - return c.Conn.InsertWebGraphQLEvent(sessionID, session.ProjectID, project.SaveRequestPayloads, e) + return c.Conn.InsertWebGraphQL(sessionID, session.ProjectID, project.SaveRequestPayloads, e) } func (c *PGCache) InsertWebCustomEvent(sessionID uint64, e *CustomEvent) error { diff --git a/backend/pkg/db/postgres/connector.go b/backend/pkg/db/postgres/connector.go index 9e269fcc0..85098376c 100644 --- a/backend/pkg/db/postgres/connector.go +++ b/backend/pkg/db/postgres/connector.go @@ -34,7 +34,7 @@ type Conn struct { customEvents Bulk webPageEvents Bulk webInputEvents Bulk - webGraphQLEvents Bulk + webGraphQL Bulk sessionUpdates map[uint64]*sessionUpdates batchQueueLimit int batchSizeLimit int @@ -144,7 +144,7 @@ func (conn *Conn) initBulks() { if err != nil { log.Fatalf("can't create webPageEvents bulk") } - conn.webGraphQLEvents, err = NewBulk(conn.c, + conn.webGraphQL, err = NewBulk(conn.c, "events.graphql", "(session_id, timestamp, message_id, name, request_body, response_body)", "($%d, $%d, $%d, left($%d, 2700), $%d, $%d)", @@ -214,8 +214,8 @@ func (conn *Conn) sendBulks() { if err := conn.webInputEvents.Send(); err != nil { log.Printf("webInputEvents bulk send err: %s", err) } - if err := conn.webGraphQLEvents.Send(); err != nil { - log.Printf("webGraphQLEvents bulk send err: %s", err) + if err := conn.webGraphQL.Send(); err != nil { + log.Printf("webGraphQL bulk send err: %s", err) } } diff --git a/backend/pkg/db/postgres/messages-web.go b/backend/pkg/db/postgres/messages-web.go index 10cfad409..10c953fcb 100644 --- a/backend/pkg/db/postgres/messages-web.go +++ b/backend/pkg/db/postgres/messages-web.go @@ -9,9 +9,13 @@ import ( ) func (conn *Conn) InsertWebCustomEvent(sessionID uint64, projectID uint32, e *CustomEvent) error { - err := conn.InsertCustomEvent(sessionID, e.Timestamp, - truncSqIdx(e.MessageID), - e.Name, e.Payload) + err := conn.InsertCustomEvent( + sessionID, + uint64(e.Meta().Timestamp), + truncSqIdx(e.Meta().Index), + e.Name, + e.Payload, + ) if err == nil { conn.insertAutocompleteValue(sessionID, projectID, "CUSTOM", e.Name) } @@ -144,7 +148,7 @@ func (conn *Conn) InsertWebErrorEvent(sessionID uint64, projectID uint32, e *typ return } -func (conn *Conn) InsertWebFetchEvent(sessionID uint64, projectID uint32, savePayload bool, e *FetchEvent) error { +func (conn *Conn) InsertWebFetch(sessionID uint64, projectID uint32, savePayload bool, e *Fetch) error { var request, response *string if savePayload { request = &e.Request @@ -169,7 +173,7 @@ func (conn *Conn) InsertWebFetchEvent(sessionID uint64, projectID uint32, savePa $12, $13 ) ON CONFLICT DO NOTHING` conn.batchQueue(sessionID, sqlRequest, - sessionID, e.Timestamp, truncSqIdx(e.MessageID), + sessionID, e.Meta().Timestamp, truncSqIdx(e.Meta().Index), e.URL, host, path, query, request, response, e.Status, url.EnsureMethod(e.Method), e.Duration, e.Status < 400, @@ -181,13 +185,13 @@ func (conn *Conn) InsertWebFetchEvent(sessionID uint64, projectID uint32, savePa return nil } -func (conn *Conn) InsertWebGraphQLEvent(sessionID uint64, projectID uint32, savePayload bool, e *GraphQLEvent) error { +func (conn *Conn) InsertWebGraphQL(sessionID uint64, projectID uint32, savePayload bool, e *GraphQL) error { var request, response *string if savePayload { request = &e.Variables response = &e.Response } - if err := conn.webGraphQLEvents.Append(sessionID, e.Timestamp, truncSqIdx(e.MessageID), e.OperationName, request, response); err != nil { + if err := conn.webGraphQL.Append(sessionID, e.Meta().Timestamp, truncSqIdx(e.Meta().Index), e.OperationName, request, response); err != nil { log.Printf("insert web graphQL event err: %s", err) } conn.insertAutocompleteValue(sessionID, projectID, "GRAPHQL", e.OperationName) diff --git a/backend/pkg/handlers/custom/eventMapper.go b/backend/pkg/handlers/custom/eventMapper.go index 3280e7ebc..a85ebbdf0 100644 --- a/backend/pkg/handlers/custom/eventMapper.go +++ b/backend/pkg/handlers/custom/eventMapper.go @@ -69,13 +69,6 @@ func (b *EventMapper) Handle(message Message, messageID uint64, timestamp uint64 Type: getResourceType(msg.Initiator, msg.URL), Success: msg.Duration != 0, } - case *RawCustomEvent: - return &CustomEvent{ - MessageID: messageID, - Timestamp: timestamp, - Name: msg.Name, - Payload: msg.Payload, - } case *CustomIssue: return &IssueEvent{ Type: "custom", @@ -84,32 +77,6 @@ func (b *EventMapper) Handle(message Message, messageID uint64, timestamp uint64 ContextString: msg.Name, Payload: msg.Payload, } - case *Fetch: - return &FetchEvent{ - MessageID: messageID, - Timestamp: msg.Timestamp, - Method: msg.Method, - URL: msg.URL, - Request: msg.Request, - Response: msg.Response, - Status: msg.Status, - Duration: msg.Duration, - } - case *GraphQL: - return &GraphQLEvent{ - MessageID: messageID, - Timestamp: timestamp, - OperationKind: msg.OperationKind, - OperationName: msg.OperationName, - Variables: msg.Variables, - Response: msg.Response, - } - case *StateAction: - return &StateActionEvent{ - MessageID: messageID, - Timestamp: timestamp, - Type: msg.Type, - } } return nil } diff --git a/backend/pkg/messages/filters.go b/backend/pkg/messages/filters.go index 3485e520f..ee5a08d8e 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 80 != id && 81 != id && 82 != id && 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 && 35 != id && 36 != id && 42 != id && 43 != id && 50 != id && 51 != id && 52 != id && 53 != id && 56 != id && 62 != id && 63 != id && 64 != id && 66 != id && 78 != id && 126 != id && 127 != id && 107 != id && 91 != id && 92 != id && 94 != id && 95 != id && 97 != id && 98 != id && 99 != id && 101 != id && 104 != id && 110 != id && 111 != id + return 80 != id && 81 != id && 82 != id && 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 && 35 != id && 42 != id && 52 != id && 53 != id && 56 != id && 62 != id && 63 != id && 64 != id && 66 != id && 78 != id && 126 != id && 127 != id && 107 != id && 91 != id && 92 != id && 94 != id && 95 != id && 97 != id && 98 != id && 99 != id && 101 != id && 104 != id && 110 != id && 111 != id } func IsIOSType(id int) bool { @@ -11,4 +11,4 @@ func IsIOSType(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 || 37 == id || 38 == id || 49 == id || 54 == id || 55 == id || 57 == id || 58 == id || 59 == id || 60 == id || 61 == id || 67 == id || 69 == id || 70 == id || 71 == id || 72 == id || 73 == id || 74 == id || 75 == id || 76 == id || 77 == id || 90 == id || 93 == id || 96 == id || 100 == id || 102 == id || 103 == id || 105 == id -} \ No newline at end of file +} diff --git a/backend/pkg/messages/messages.go b/backend/pkg/messages/messages.go index 53fcfcd79..c8a0c620e 100644 --- a/backend/pkg/messages/messages.go +++ b/backend/pkg/messages/messages.go @@ -2,113 +2,108 @@ package messages const ( - MsgBatchMeta = 80 - MsgBatchMetadata = 81 - MsgPartitionedMessage = 82 - MsgTimestamp = 0 - MsgSessionStart = 1 - MsgSessionEndDeprecated = 3 - MsgSetPageLocation = 4 - MsgSetViewportSize = 5 - MsgSetViewportScroll = 6 - MsgCreateDocument = 7 - MsgCreateElementNode = 8 - MsgCreateTextNode = 9 - MsgMoveNode = 10 - MsgRemoveNode = 11 - MsgSetNodeAttribute = 12 - MsgRemoveNodeAttribute = 13 - MsgSetNodeData = 14 - MsgSetCSSData = 15 - MsgSetNodeScroll = 16 - MsgSetInputTarget = 17 - MsgSetInputValue = 18 - MsgSetInputChecked = 19 - MsgMouseMove = 20 - MsgConsoleLog = 22 - MsgPageLoadTiming = 23 - MsgPageRenderTiming = 24 - MsgJSExceptionDeprecated = 25 - MsgIntegrationEvent = 26 - MsgRawCustomEvent = 27 - MsgUserID = 28 - MsgUserAnonymousID = 29 - MsgMetadata = 30 - MsgPageEvent = 31 - MsgInputEvent = 32 - MsgClickEvent = 33 - MsgResourceEvent = 35 - MsgCustomEvent = 36 - MsgCSSInsertRule = 37 - MsgCSSDeleteRule = 38 - MsgFetch = 39 - MsgProfiler = 40 - MsgOTable = 41 - MsgStateAction = 42 - MsgStateActionEvent = 43 - MsgRedux = 44 - MsgVuex = 45 - MsgMobX = 46 - MsgNgRx = 47 - MsgGraphQL = 48 - MsgPerformanceTrack = 49 - MsgGraphQLEvent = 50 - MsgFetchEvent = 51 - MsgDOMDrop = 52 - MsgResourceTiming = 53 - MsgConnectionInformation = 54 - MsgSetPageVisibility = 55 - MsgPerformanceTrackAggr = 56 - MsgLoadFontFace = 57 - MsgSetNodeFocus = 58 - MsgLongTask = 59 - MsgSetNodeAttributeURLBased = 60 - MsgSetCSSDataURLBased = 61 - MsgIssueEvent = 62 - MsgTechnicalInfo = 63 - MsgCustomIssue = 64 - MsgAssetCache = 66 - MsgCSSInsertRuleURLBased = 67 - MsgMouseClick = 69 - MsgCreateIFrameDocument = 70 - MsgAdoptedSSReplaceURLBased = 71 - MsgAdoptedSSReplace = 72 - MsgAdoptedSSInsertRuleURLBased = 73 - MsgAdoptedSSInsertRule = 74 - MsgAdoptedSSDeleteRule = 75 - MsgAdoptedSSAddOwner = 76 - MsgAdoptedSSRemoveOwner = 77 - MsgZustand = 79 - MsgJSException = 78 - MsgSessionEnd = 126 - MsgSessionSearch = 127 - MsgIOSBatchMeta = 107 - MsgIOSSessionStart = 90 - MsgIOSSessionEnd = 91 - MsgIOSMetadata = 92 - MsgIOSCustomEvent = 93 - MsgIOSUserID = 94 - MsgIOSUserAnonymousID = 95 - MsgIOSScreenChanges = 96 - MsgIOSCrash = 97 - MsgIOSScreenEnter = 98 - MsgIOSScreenLeave = 99 - MsgIOSClickEvent = 100 - MsgIOSInputEvent = 101 - MsgIOSPerformanceEvent = 102 - MsgIOSLog = 103 - MsgIOSInternalError = 104 - MsgIOSNetworkCall = 105 - MsgIOSPerformanceAggregated = 110 - MsgIOSIssueEvent = 111 + MsgBatchMeta = 80 + MsgBatchMetadata = 81 + MsgPartitionedMessage = 82 + MsgTimestamp = 0 + MsgSessionStart = 1 + MsgSessionEndDeprecated = 3 + MsgSetPageLocation = 4 + MsgSetViewportSize = 5 + MsgSetViewportScroll = 6 + MsgCreateDocument = 7 + MsgCreateElementNode = 8 + MsgCreateTextNode = 9 + MsgMoveNode = 10 + MsgRemoveNode = 11 + MsgSetNodeAttribute = 12 + MsgRemoveNodeAttribute = 13 + MsgSetNodeData = 14 + MsgSetCSSData = 15 + MsgSetNodeScroll = 16 + MsgSetInputTarget = 17 + MsgSetInputValue = 18 + MsgSetInputChecked = 19 + MsgMouseMove = 20 + MsgConsoleLog = 22 + MsgPageLoadTiming = 23 + MsgPageRenderTiming = 24 + MsgJSExceptionDeprecated = 25 + MsgIntegrationEvent = 26 + MsgCustomEvent = 27 + MsgUserID = 28 + MsgUserAnonymousID = 29 + MsgMetadata = 30 + MsgPageEvent = 31 + MsgInputEvent = 32 + MsgClickEvent = 33 + MsgResourceEvent = 35 + MsgCSSInsertRule = 37 + MsgCSSDeleteRule = 38 + MsgFetch = 39 + MsgProfiler = 40 + MsgOTable = 41 + MsgStateAction = 42 + MsgRedux = 44 + MsgVuex = 45 + MsgMobX = 46 + MsgNgRx = 47 + MsgGraphQL = 48 + MsgPerformanceTrack = 49 + MsgDOMDrop = 52 + MsgResourceTiming = 53 + MsgConnectionInformation = 54 + MsgSetPageVisibility = 55 + MsgPerformanceTrackAggr = 56 + MsgLoadFontFace = 57 + MsgSetNodeFocus = 58 + MsgLongTask = 59 + MsgSetNodeAttributeURLBased = 60 + MsgSetCSSDataURLBased = 61 + MsgIssueEvent = 62 + MsgTechnicalInfo = 63 + MsgCustomIssue = 64 + MsgAssetCache = 66 + MsgCSSInsertRuleURLBased = 67 + MsgMouseClick = 69 + MsgCreateIFrameDocument = 70 + MsgAdoptedSSReplaceURLBased = 71 + MsgAdoptedSSReplace = 72 + MsgAdoptedSSInsertRuleURLBased = 73 + MsgAdoptedSSInsertRule = 74 + MsgAdoptedSSDeleteRule = 75 + MsgAdoptedSSAddOwner = 76 + MsgAdoptedSSRemoveOwner = 77 + MsgZustand = 79 + MsgJSException = 78 + MsgSessionEnd = 126 + MsgSessionSearch = 127 + MsgIOSBatchMeta = 107 + MsgIOSSessionStart = 90 + MsgIOSSessionEnd = 91 + MsgIOSMetadata = 92 + MsgIOSCustomEvent = 93 + MsgIOSUserID = 94 + MsgIOSUserAnonymousID = 95 + MsgIOSScreenChanges = 96 + MsgIOSCrash = 97 + MsgIOSScreenEnter = 98 + MsgIOSScreenLeave = 99 + MsgIOSClickEvent = 100 + MsgIOSInputEvent = 101 + MsgIOSPerformanceEvent = 102 + MsgIOSLog = 103 + MsgIOSInternalError = 104 + MsgIOSNetworkCall = 105 + MsgIOSPerformanceAggregated = 110 + MsgIOSIssueEvent = 111 ) - type BatchMeta struct { message - PageNo uint64 + PageNo uint64 FirstIndex uint64 - Timestamp int64 + Timestamp int64 } func (msg *BatchMeta) Encode() []byte { @@ -131,11 +126,11 @@ func (msg *BatchMeta) TypeID() int { type BatchMetadata struct { message - Version uint64 - PageNo uint64 + Version uint64 + PageNo uint64 FirstIndex uint64 - Timestamp int64 - Location string + Timestamp int64 + Location string } func (msg *BatchMetadata) Encode() []byte { @@ -160,7 +155,7 @@ func (msg *BatchMetadata) TypeID() int { type PartitionedMessage struct { message - PartNo uint64 + PartNo uint64 PartTotal uint64 } @@ -204,22 +199,22 @@ func (msg *Timestamp) TypeID() int { type SessionStart struct { message - Timestamp uint64 - ProjectID uint64 - TrackerVersion string - RevID string - UserUUID string - UserAgent string - UserOS string - UserOSVersion string - UserBrowser string - UserBrowserVersion string - UserDevice string - UserDeviceType string + Timestamp uint64 + ProjectID uint64 + TrackerVersion string + RevID string + UserUUID string + UserAgent string + UserOS string + UserOSVersion string + UserBrowser string + UserBrowserVersion string + UserDevice string + UserDeviceType string UserDeviceMemorySize uint64 - UserDeviceHeapSize uint64 - UserCountry string - UserID string + UserDeviceHeapSize uint64 + UserCountry string + UserID string } func (msg *SessionStart) Encode() []byte { @@ -276,8 +271,8 @@ func (msg *SessionEndDeprecated) TypeID() int { type SetPageLocation struct { message - URL string - Referrer string + URL string + Referrer string NavigationStart uint64 } @@ -301,7 +296,7 @@ func (msg *SetPageLocation) TypeID() int { type SetViewportSize struct { message - Width uint64 + Width uint64 Height uint64 } @@ -347,7 +342,6 @@ func (msg *SetViewportScroll) TypeID() int { type CreateDocument struct { message - } func (msg *CreateDocument) Encode() []byte { @@ -368,11 +362,11 @@ func (msg *CreateDocument) TypeID() int { type CreateElementNode struct { message - ID uint64 + ID uint64 ParentID uint64 - index uint64 - Tag string - SVG bool + index uint64 + Tag string + SVG bool } func (msg *CreateElementNode) Encode() []byte { @@ -397,9 +391,9 @@ func (msg *CreateElementNode) TypeID() int { type CreateTextNode struct { message - ID uint64 + ID uint64 ParentID uint64 - Index uint64 + Index uint64 } func (msg *CreateTextNode) Encode() []byte { @@ -422,9 +416,9 @@ func (msg *CreateTextNode) TypeID() int { type MoveNode struct { message - ID uint64 + ID uint64 ParentID uint64 - Index uint64 + Index uint64 } func (msg *MoveNode) Encode() []byte { @@ -468,8 +462,8 @@ func (msg *RemoveNode) TypeID() int { type SetNodeAttribute struct { message - ID uint64 - Name string + ID uint64 + Name string Value string } @@ -493,7 +487,7 @@ func (msg *SetNodeAttribute) TypeID() int { type RemoveNodeAttribute struct { message - ID uint64 + ID uint64 Name string } @@ -516,7 +510,7 @@ func (msg *RemoveNodeAttribute) TypeID() int { type SetNodeData struct { message - ID uint64 + ID uint64 Data string } @@ -539,7 +533,7 @@ func (msg *SetNodeData) TypeID() int { type SetCSSData struct { message - ID uint64 + ID uint64 Data string } @@ -563,8 +557,8 @@ func (msg *SetCSSData) TypeID() int { type SetNodeScroll struct { message ID uint64 - X int64 - Y int64 + X int64 + Y int64 } func (msg *SetNodeScroll) Encode() []byte { @@ -587,7 +581,7 @@ func (msg *SetNodeScroll) TypeID() int { type SetInputTarget struct { message - ID uint64 + ID uint64 Label string } @@ -610,9 +604,9 @@ func (msg *SetInputTarget) TypeID() int { type SetInputValue struct { message - ID uint64 + ID uint64 Value string - Mask int64 + Mask int64 } func (msg *SetInputValue) Encode() []byte { @@ -635,7 +629,7 @@ func (msg *SetInputValue) TypeID() int { type SetInputChecked struct { message - ID uint64 + ID uint64 Checked bool } @@ -704,15 +698,15 @@ func (msg *ConsoleLog) TypeID() int { type PageLoadTiming struct { message - RequestStart uint64 - ResponseStart uint64 - ResponseEnd uint64 + RequestStart uint64 + ResponseStart uint64 + ResponseEnd uint64 DomContentLoadedEventStart uint64 - DomContentLoadedEventEnd uint64 - LoadEventStart uint64 - LoadEventEnd uint64 - FirstPaint uint64 - FirstContentfulPaint uint64 + DomContentLoadedEventEnd uint64 + LoadEventStart uint64 + LoadEventEnd uint64 + FirstPaint uint64 + FirstContentfulPaint uint64 } func (msg *PageLoadTiming) Encode() []byte { @@ -741,8 +735,8 @@ func (msg *PageLoadTiming) TypeID() int { type PageRenderTiming struct { message - SpeedIndex uint64 - VisuallyComplete uint64 + SpeedIndex uint64 + VisuallyComplete uint64 TimeToInteractive uint64 } @@ -766,7 +760,7 @@ func (msg *PageRenderTiming) TypeID() int { type JSExceptionDeprecated struct { message - Name string + Name string Message string Payload string } @@ -792,10 +786,10 @@ func (msg *JSExceptionDeprecated) TypeID() int { type IntegrationEvent struct { message Timestamp uint64 - Source string - Name string - Message string - Payload string + Source string + Name string + Message string + Payload string } func (msg *IntegrationEvent) Encode() []byte { @@ -818,13 +812,13 @@ func (msg *IntegrationEvent) TypeID() int { return 26 } -type RawCustomEvent struct { +type CustomEvent struct { message - Name string + Name string Payload string } -func (msg *RawCustomEvent) Encode() []byte { +func (msg *CustomEvent) Encode() []byte { buf := make([]byte, 21+len(msg.Name)+len(msg.Payload)) buf[0] = 27 p := 1 @@ -833,11 +827,11 @@ func (msg *RawCustomEvent) Encode() []byte { return buf[:p] } -func (msg *RawCustomEvent) Decode() Message { +func (msg *CustomEvent) Decode() Message { return msg } -func (msg *RawCustomEvent) TypeID() int { +func (msg *CustomEvent) TypeID() int { return 27 } @@ -885,7 +879,7 @@ func (msg *UserAnonymousID) TypeID() int { type Metadata struct { message - Key string + Key string Value string } @@ -908,23 +902,23 @@ func (msg *Metadata) TypeID() int { type PageEvent struct { message - MessageID uint64 - Timestamp uint64 - URL string - Referrer string - Loaded bool - RequestStart uint64 - ResponseStart uint64 - ResponseEnd uint64 + MessageID uint64 + Timestamp uint64 + URL string + Referrer string + Loaded bool + RequestStart uint64 + ResponseStart uint64 + ResponseEnd uint64 DomContentLoadedEventStart uint64 - DomContentLoadedEventEnd uint64 - LoadEventStart uint64 - LoadEventEnd uint64 - FirstPaint uint64 - FirstContentfulPaint uint64 - SpeedIndex uint64 - VisuallyComplete uint64 - TimeToInteractive uint64 + DomContentLoadedEventEnd uint64 + LoadEventStart uint64 + LoadEventEnd uint64 + FirstPaint uint64 + FirstContentfulPaint uint64 + SpeedIndex uint64 + VisuallyComplete uint64 + TimeToInteractive uint64 } func (msg *PageEvent) Encode() []byte { @@ -961,11 +955,11 @@ func (msg *PageEvent) TypeID() int { type InputEvent struct { message - MessageID uint64 - Timestamp uint64 - Value string + MessageID uint64 + Timestamp uint64 + Value string ValueMasked bool - Label string + Label string } func (msg *InputEvent) Encode() []byte { @@ -990,11 +984,11 @@ func (msg *InputEvent) TypeID() int { type ClickEvent struct { message - MessageID uint64 - Timestamp uint64 + MessageID uint64 + Timestamp uint64 HesitationTime uint64 - Label string - Selector string + Label string + Selector string } func (msg *ClickEvent) Encode() []byte { @@ -1019,18 +1013,18 @@ func (msg *ClickEvent) TypeID() int { type ResourceEvent struct { message - MessageID uint64 - Timestamp uint64 - Duration uint64 - TTFB uint64 - HeaderSize uint64 + MessageID uint64 + Timestamp uint64 + Duration uint64 + TTFB uint64 + HeaderSize uint64 EncodedBodySize uint64 DecodedBodySize uint64 - URL string - Type string - Success bool - Method string - Status uint64 + URL string + Type string + Success bool + Method string + Status uint64 } func (msg *ResourceEvent) Encode() []byte { @@ -1060,37 +1054,10 @@ func (msg *ResourceEvent) TypeID() int { return 35 } -type CustomEvent struct { - message - MessageID uint64 - Timestamp uint64 - Name string - Payload string -} - -func (msg *CustomEvent) Encode() []byte { - buf := make([]byte, 41+len(msg.Name)+len(msg.Payload)) - buf[0] = 36 - p := 1 - p = WriteUint(msg.MessageID, buf, p) - p = WriteUint(msg.Timestamp, buf, p) - p = WriteString(msg.Name, buf, p) - p = WriteString(msg.Payload, buf, p) - return buf[:p] -} - -func (msg *CustomEvent) Decode() Message { - return msg -} - -func (msg *CustomEvent) TypeID() int { - return 36 -} - type CSSInsertRule struct { message - ID uint64 - Rule string + ID uint64 + Rule string Index uint64 } @@ -1114,7 +1081,7 @@ func (msg *CSSInsertRule) TypeID() int { type CSSDeleteRule struct { message - ID uint64 + ID uint64 Index uint64 } @@ -1137,13 +1104,13 @@ func (msg *CSSDeleteRule) TypeID() int { type Fetch struct { message - Method string - URL string - Request string - Response string - Status uint64 + Method string + URL string + Request string + Response string + Status uint64 Timestamp uint64 - Duration uint64 + Duration uint64 } func (msg *Fetch) Encode() []byte { @@ -1170,10 +1137,10 @@ func (msg *Fetch) TypeID() int { type Profiler struct { message - Name string + Name string Duration uint64 - Args string - Result string + Args string + Result string } func (msg *Profiler) Encode() []byte { @@ -1197,7 +1164,7 @@ func (msg *Profiler) TypeID() int { type OTable struct { message - Key string + Key string Value string } @@ -1239,35 +1206,10 @@ func (msg *StateAction) TypeID() int { return 42 } -type StateActionEvent struct { - message - MessageID uint64 - Timestamp uint64 - Type string -} - -func (msg *StateActionEvent) Encode() []byte { - buf := make([]byte, 31+len(msg.Type)) - buf[0] = 43 - p := 1 - p = WriteUint(msg.MessageID, buf, p) - p = WriteUint(msg.Timestamp, buf, p) - p = WriteString(msg.Type, buf, p) - return buf[:p] -} - -func (msg *StateActionEvent) Decode() Message { - return msg -} - -func (msg *StateActionEvent) TypeID() int { - return 43 -} - type Redux struct { message - Action string - State string + Action string + State string Duration uint64 } @@ -1292,7 +1234,7 @@ func (msg *Redux) TypeID() int { type Vuex struct { message Mutation string - State string + State string } func (msg *Vuex) Encode() []byte { @@ -1314,7 +1256,7 @@ func (msg *Vuex) TypeID() int { type MobX struct { message - Type string + Type string Payload string } @@ -1337,8 +1279,8 @@ func (msg *MobX) TypeID() int { type NgRx struct { message - Action string - State string + Action string + State string Duration uint64 } @@ -1364,8 +1306,8 @@ type GraphQL struct { message OperationKind string OperationName string - Variables string - Response string + Variables string + Response string } func (msg *GraphQL) Encode() []byte { @@ -1389,10 +1331,10 @@ func (msg *GraphQL) TypeID() int { type PerformanceTrack struct { message - Frames int64 - Ticks int64 + Frames int64 + Ticks int64 TotalJSHeapSize uint64 - UsedJSHeapSize uint64 + UsedJSHeapSize uint64 } func (msg *PerformanceTrack) Encode() []byte { @@ -1414,72 +1356,6 @@ func (msg *PerformanceTrack) TypeID() int { return 49 } -type GraphQLEvent struct { - message - MessageID uint64 - Timestamp uint64 - OperationKind string - OperationName string - Variables string - Response string -} - -func (msg *GraphQLEvent) Encode() []byte { - buf := make([]byte, 61+len(msg.OperationKind)+len(msg.OperationName)+len(msg.Variables)+len(msg.Response)) - buf[0] = 50 - p := 1 - p = WriteUint(msg.MessageID, buf, p) - p = WriteUint(msg.Timestamp, buf, p) - p = WriteString(msg.OperationKind, buf, p) - p = WriteString(msg.OperationName, buf, p) - p = WriteString(msg.Variables, buf, p) - p = WriteString(msg.Response, buf, p) - return buf[:p] -} - -func (msg *GraphQLEvent) Decode() Message { - return msg -} - -func (msg *GraphQLEvent) TypeID() int { - return 50 -} - -type FetchEvent struct { - message - MessageID uint64 - Timestamp uint64 - Method string - URL string - Request string - Response string - Status uint64 - Duration uint64 -} - -func (msg *FetchEvent) Encode() []byte { - buf := make([]byte, 81+len(msg.Method)+len(msg.URL)+len(msg.Request)+len(msg.Response)) - buf[0] = 51 - p := 1 - p = WriteUint(msg.MessageID, buf, p) - p = WriteUint(msg.Timestamp, buf, p) - 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.Duration, buf, p) - return buf[:p] -} - -func (msg *FetchEvent) Decode() Message { - return msg -} - -func (msg *FetchEvent) TypeID() int { - return 51 -} - type DOMDrop struct { message Timestamp uint64 @@ -1503,14 +1379,14 @@ func (msg *DOMDrop) TypeID() int { type ResourceTiming struct { message - Timestamp uint64 - Duration uint64 - TTFB uint64 - HeaderSize uint64 + Timestamp uint64 + Duration uint64 + TTFB uint64 + HeaderSize uint64 EncodedBodySize uint64 DecodedBodySize uint64 - URL string - Initiator string + URL string + Initiator string } func (msg *ResourceTiming) Encode() []byte { @@ -1539,7 +1415,7 @@ func (msg *ResourceTiming) TypeID() int { type ConnectionInformation struct { message Downlink uint64 - Type string + Type string } func (msg *ConnectionInformation) Encode() []byte { @@ -1582,20 +1458,20 @@ func (msg *SetPageVisibility) TypeID() int { type PerformanceTrackAggr struct { message - TimestampStart uint64 - TimestampEnd uint64 - MinFPS uint64 - AvgFPS uint64 - MaxFPS uint64 - MinCPU uint64 - AvgCPU uint64 - MaxCPU uint64 + TimestampStart uint64 + TimestampEnd uint64 + MinFPS uint64 + AvgFPS uint64 + MaxFPS uint64 + MinCPU uint64 + AvgCPU uint64 + MaxCPU uint64 MinTotalJSHeapSize uint64 AvgTotalJSHeapSize uint64 MaxTotalJSHeapSize uint64 - MinUsedJSHeapSize uint64 - AvgUsedJSHeapSize uint64 - MaxUsedJSHeapSize uint64 + MinUsedJSHeapSize uint64 + AvgUsedJSHeapSize uint64 + MaxUsedJSHeapSize uint64 } func (msg *PerformanceTrackAggr) Encode() []byte { @@ -1629,9 +1505,9 @@ func (msg *PerformanceTrackAggr) TypeID() int { type LoadFontFace struct { message - ParentID uint64 - Family string - Source string + ParentID uint64 + Family string + Source string Descriptors string } @@ -1677,12 +1553,12 @@ func (msg *SetNodeFocus) TypeID() int { type LongTask struct { message - Timestamp uint64 - Duration uint64 - Context uint64 + Timestamp uint64 + Duration uint64 + Context uint64 ContainerType uint64 - ContainerSrc string - ContainerId string + ContainerSrc string + ContainerId string ContainerName string } @@ -1710,9 +1586,9 @@ func (msg *LongTask) TypeID() int { type SetNodeAttributeURLBased struct { message - ID uint64 - Name string - Value string + ID uint64 + Name string + Value string BaseURL string } @@ -1737,8 +1613,8 @@ func (msg *SetNodeAttributeURLBased) TypeID() int { type SetCSSDataURLBased struct { message - ID uint64 - Data string + ID uint64 + Data string BaseURL string } @@ -1762,12 +1638,12 @@ func (msg *SetCSSDataURLBased) TypeID() int { type IssueEvent struct { message - MessageID uint64 - Timestamp uint64 - Type string + MessageID uint64 + Timestamp uint64 + Type string ContextString string - Context string - Payload string + Context string + Payload string } func (msg *IssueEvent) Encode() []byte { @@ -1793,7 +1669,7 @@ func (msg *IssueEvent) TypeID() int { type TechnicalInfo struct { message - Type string + Type string Value string } @@ -1816,7 +1692,7 @@ func (msg *TechnicalInfo) TypeID() int { type CustomIssue struct { message - Name string + Name string Payload string } @@ -1860,9 +1736,9 @@ func (msg *AssetCache) TypeID() int { type CSSInsertRuleURLBased struct { message - ID uint64 - Rule string - Index uint64 + ID uint64 + Rule string + Index uint64 BaseURL string } @@ -1887,10 +1763,10 @@ func (msg *CSSInsertRuleURLBased) TypeID() int { type MouseClick struct { message - ID uint64 + ID uint64 HesitationTime uint64 - Label string - Selector string + Label string + Selector string } func (msg *MouseClick) Encode() []byte { @@ -1915,7 +1791,7 @@ func (msg *MouseClick) TypeID() int { type CreateIFrameDocument struct { message FrameID uint64 - ID uint64 + ID uint64 } func (msg *CreateIFrameDocument) Encode() []byte { @@ -1938,7 +1814,7 @@ func (msg *CreateIFrameDocument) TypeID() int { type AdoptedSSReplaceURLBased struct { message SheetID uint64 - Text string + Text string BaseURL string } @@ -1963,7 +1839,7 @@ func (msg *AdoptedSSReplaceURLBased) TypeID() int { type AdoptedSSReplace struct { message SheetID uint64 - Text string + Text string } func (msg *AdoptedSSReplace) Encode() []byte { @@ -1986,8 +1862,8 @@ func (msg *AdoptedSSReplace) TypeID() int { type AdoptedSSInsertRuleURLBased struct { message SheetID uint64 - Rule string - Index uint64 + Rule string + Index uint64 BaseURL string } @@ -2013,8 +1889,8 @@ func (msg *AdoptedSSInsertRuleURLBased) TypeID() int { type AdoptedSSInsertRule struct { message SheetID uint64 - Rule string - Index uint64 + Rule string + Index uint64 } func (msg *AdoptedSSInsertRule) Encode() []byte { @@ -2038,7 +1914,7 @@ func (msg *AdoptedSSInsertRule) TypeID() int { type AdoptedSSDeleteRule struct { message SheetID uint64 - Index uint64 + Index uint64 } func (msg *AdoptedSSDeleteRule) Encode() []byte { @@ -2061,7 +1937,7 @@ func (msg *AdoptedSSDeleteRule) TypeID() int { type AdoptedSSAddOwner struct { message SheetID uint64 - ID uint64 + ID uint64 } func (msg *AdoptedSSAddOwner) Encode() []byte { @@ -2084,7 +1960,7 @@ func (msg *AdoptedSSAddOwner) TypeID() int { type AdoptedSSRemoveOwner struct { message SheetID uint64 - ID uint64 + ID uint64 } func (msg *AdoptedSSRemoveOwner) Encode() []byte { @@ -2107,7 +1983,7 @@ func (msg *AdoptedSSRemoveOwner) TypeID() int { type Zustand struct { message Mutation string - State string + State string } func (msg *Zustand) Encode() []byte { @@ -2129,9 +2005,9 @@ func (msg *Zustand) TypeID() int { type JSException struct { message - Name string - Message string - Payload string + Name string + Message string + Payload string Metadata string } @@ -2156,7 +2032,7 @@ func (msg *JSException) TypeID() int { type SessionEnd struct { message - Timestamp uint64 + Timestamp uint64 EncryptionKey string } @@ -2202,8 +2078,8 @@ func (msg *SessionSearch) TypeID() int { type IOSBatchMeta struct { message - Timestamp uint64 - Length uint64 + Timestamp uint64 + Length uint64 FirstIndex uint64 } @@ -2227,16 +2103,16 @@ func (msg *IOSBatchMeta) TypeID() int { type IOSSessionStart struct { message - Timestamp uint64 - ProjectID uint64 + Timestamp uint64 + ProjectID uint64 TrackerVersion string - RevID string - UserUUID string - UserOS string - UserOSVersion string - UserDevice string + RevID string + UserUUID string + UserOS string + UserOSVersion string + UserDevice string UserDeviceType string - UserCountry string + UserCountry string } func (msg *IOSSessionStart) Encode() []byte { @@ -2288,9 +2164,9 @@ func (msg *IOSSessionEnd) TypeID() int { type IOSMetadata struct { message Timestamp uint64 - Length uint64 - Key string - Value string + Length uint64 + Key string + Value string } func (msg *IOSMetadata) Encode() []byte { @@ -2315,9 +2191,9 @@ func (msg *IOSMetadata) TypeID() int { type IOSCustomEvent struct { message Timestamp uint64 - Length uint64 - Name string - Payload string + Length uint64 + Name string + Payload string } func (msg *IOSCustomEvent) Encode() []byte { @@ -2342,8 +2218,8 @@ func (msg *IOSCustomEvent) TypeID() int { type IOSUserID struct { message Timestamp uint64 - Length uint64 - Value string + Length uint64 + Value string } func (msg *IOSUserID) Encode() []byte { @@ -2367,8 +2243,8 @@ func (msg *IOSUserID) TypeID() int { type IOSUserAnonymousID struct { message Timestamp uint64 - Length uint64 - Value string + Length uint64 + Value string } func (msg *IOSUserAnonymousID) Encode() []byte { @@ -2392,11 +2268,11 @@ func (msg *IOSUserAnonymousID) TypeID() int { type IOSScreenChanges struct { message Timestamp uint64 - Length uint64 - X uint64 - Y uint64 - Width uint64 - Height uint64 + Length uint64 + X uint64 + Y uint64 + Width uint64 + Height uint64 } func (msg *IOSScreenChanges) Encode() []byte { @@ -2422,10 +2298,10 @@ func (msg *IOSScreenChanges) TypeID() int { type IOSCrash struct { message - Timestamp uint64 - Length uint64 - Name string - Reason string + Timestamp uint64 + Length uint64 + Name string + Reason string Stacktrace string } @@ -2452,9 +2328,9 @@ func (msg *IOSCrash) TypeID() int { type IOSScreenEnter struct { message Timestamp uint64 - Length uint64 - Title string - ViewName string + Length uint64 + Title string + ViewName string } func (msg *IOSScreenEnter) Encode() []byte { @@ -2479,9 +2355,9 @@ func (msg *IOSScreenEnter) TypeID() int { type IOSScreenLeave struct { message Timestamp uint64 - Length uint64 - Title string - ViewName string + Length uint64 + Title string + ViewName string } func (msg *IOSScreenLeave) Encode() []byte { @@ -2506,10 +2382,10 @@ func (msg *IOSScreenLeave) TypeID() int { type IOSClickEvent struct { message Timestamp uint64 - Length uint64 - Label string - X uint64 - Y uint64 + Length uint64 + Label string + X uint64 + Y uint64 } func (msg *IOSClickEvent) Encode() []byte { @@ -2534,11 +2410,11 @@ func (msg *IOSClickEvent) TypeID() int { type IOSInputEvent struct { message - Timestamp uint64 - Length uint64 - Value string + Timestamp uint64 + Length uint64 + Value string ValueMasked bool - Label string + Label string } func (msg *IOSInputEvent) Encode() []byte { @@ -2564,9 +2440,9 @@ func (msg *IOSInputEvent) TypeID() int { type IOSPerformanceEvent struct { message Timestamp uint64 - Length uint64 - Name string - Value uint64 + Length uint64 + Name string + Value uint64 } func (msg *IOSPerformanceEvent) Encode() []byte { @@ -2591,9 +2467,9 @@ func (msg *IOSPerformanceEvent) TypeID() int { type IOSLog struct { message Timestamp uint64 - Length uint64 - Severity string - Content string + Length uint64 + Severity string + Content string } func (msg *IOSLog) Encode() []byte { @@ -2618,8 +2494,8 @@ func (msg *IOSLog) TypeID() int { type IOSInternalError struct { message Timestamp uint64 - Length uint64 - Content string + Length uint64 + Content string } func (msg *IOSInternalError) Encode() []byte { @@ -2643,14 +2519,14 @@ func (msg *IOSInternalError) TypeID() int { type IOSNetworkCall struct { message Timestamp uint64 - Length uint64 - Duration uint64 - Headers string - Body string - URL string - Success bool - Method string - Status uint64 + Length uint64 + Duration uint64 + Headers string + Body string + URL string + Success bool + Method string + Status uint64 } func (msg *IOSNetworkCall) Encode() []byte { @@ -2680,19 +2556,19 @@ func (msg *IOSNetworkCall) TypeID() int { type IOSPerformanceAggregated struct { message TimestampStart uint64 - TimestampEnd uint64 - MinFPS uint64 - AvgFPS uint64 - MaxFPS uint64 - MinCPU uint64 - AvgCPU uint64 - MaxCPU uint64 - MinMemory uint64 - AvgMemory uint64 - MaxMemory uint64 - MinBattery uint64 - AvgBattery uint64 - MaxBattery uint64 + TimestampEnd uint64 + MinFPS uint64 + AvgFPS uint64 + MaxFPS uint64 + MinCPU uint64 + AvgCPU uint64 + MaxCPU uint64 + MinMemory uint64 + AvgMemory uint64 + MaxMemory uint64 + MinBattery uint64 + AvgBattery uint64 + MaxBattery uint64 } func (msg *IOSPerformanceAggregated) Encode() []byte { @@ -2726,11 +2602,11 @@ func (msg *IOSPerformanceAggregated) TypeID() int { type IOSIssueEvent struct { message - Timestamp uint64 - Type string + Timestamp uint64 + Type string ContextString string - Context string - Payload string + Context string + Payload string } func (msg *IOSIssueEvent) Encode() []byte { @@ -2752,4 +2628,3 @@ func (msg *IOSIssueEvent) Decode() Message { func (msg *IOSIssueEvent) TypeID() int { return 111 } - diff --git a/backend/pkg/messages/read-message.go b/backend/pkg/messages/read-message.go index a55bea163..6e84d7cfc 100644 --- a/backend/pkg/messages/read-message.go +++ b/backend/pkg/messages/read-message.go @@ -444,9 +444,9 @@ func DecodeIntegrationEvent(reader BytesReader) (Message, error) { return msg, err } -func DecodeRawCustomEvent(reader BytesReader) (Message, error) { +func DecodeCustomEvent(reader BytesReader) (Message, error) { var err error = nil - msg := &RawCustomEvent{} + msg := &CustomEvent{} if msg.Name, err = reader.ReadString(); err != nil { return nil, err } @@ -627,24 +627,6 @@ func DecodeResourceEvent(reader BytesReader) (Message, error) { return msg, err } -func DecodeCustomEvent(reader BytesReader) (Message, error) { - var err error = nil - msg := &CustomEvent{} - if msg.MessageID, err = reader.ReadUint(); err != nil { - return nil, err - } - if msg.Timestamp, err = reader.ReadUint(); err != nil { - return nil, err - } - if msg.Name, err = reader.ReadString(); err != nil { - return nil, err - } - if msg.Payload, err = reader.ReadString(); err != nil { - return nil, err - } - return msg, err -} - func DecodeCSSInsertRule(reader BytesReader) (Message, error) { var err error = nil msg := &CSSInsertRule{} @@ -738,21 +720,6 @@ func DecodeStateAction(reader BytesReader) (Message, error) { return msg, err } -func DecodeStateActionEvent(reader BytesReader) (Message, error) { - var err error = nil - msg := &StateActionEvent{} - 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 - } - return msg, err -} - func DecodeRedux(reader BytesReader) (Message, error) { var err error = nil msg := &Redux{} @@ -843,60 +810,6 @@ func DecodePerformanceTrack(reader BytesReader) (Message, error) { return msg, err } -func DecodeGraphQLEvent(reader BytesReader) (Message, error) { - var err error = nil - msg := &GraphQLEvent{} - if msg.MessageID, err = reader.ReadUint(); err != nil { - return nil, err - } - if msg.Timestamp, err = reader.ReadUint(); err != nil { - return nil, err - } - if msg.OperationKind, err = reader.ReadString(); err != nil { - return nil, err - } - if msg.OperationName, err = reader.ReadString(); err != nil { - return nil, err - } - if msg.Variables, err = reader.ReadString(); err != nil { - return nil, err - } - if msg.Response, err = reader.ReadString(); err != nil { - return nil, err - } - return msg, err -} - -func DecodeFetchEvent(reader BytesReader) (Message, error) { - var err error = nil - msg := &FetchEvent{} - if msg.MessageID, err = reader.ReadUint(); err != nil { - return nil, err - } - if msg.Timestamp, err = reader.ReadUint(); err != nil { - return nil, err - } - 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.Duration, err = reader.ReadUint(); err != nil { - return nil, err - } - return msg, err -} - func DecodeDOMDrop(reader BytesReader) (Message, error) { var err error = nil msg := &DOMDrop{} @@ -1808,7 +1721,7 @@ func ReadMessage(t uint64, reader BytesReader) (Message, error) { case 26: return DecodeIntegrationEvent(reader) case 27: - return DecodeRawCustomEvent(reader) + return DecodeCustomEvent(reader) case 28: return DecodeUserID(reader) case 29: @@ -1823,8 +1736,6 @@ func ReadMessage(t uint64, reader BytesReader) (Message, error) { return DecodeClickEvent(reader) case 35: return DecodeResourceEvent(reader) - case 36: - return DecodeCustomEvent(reader) case 37: return DecodeCSSInsertRule(reader) case 38: @@ -1837,8 +1748,6 @@ func ReadMessage(t uint64, reader BytesReader) (Message, error) { return DecodeOTable(reader) case 42: return DecodeStateAction(reader) - case 43: - return DecodeStateActionEvent(reader) case 44: return DecodeRedux(reader) case 45: @@ -1851,10 +1760,6 @@ func ReadMessage(t uint64, reader BytesReader) (Message, error) { return DecodeGraphQL(reader) case 49: return DecodePerformanceTrack(reader) - case 50: - return DecodeGraphQLEvent(reader) - case 51: - return DecodeFetchEvent(reader) case 52: return DecodeDOMDrop(reader) case 53: diff --git a/ee/backend/internal/db/datasaver/messages.go b/ee/backend/internal/db/datasaver/messages.go index f28bd3b8f..30aa2a368 100644 --- a/ee/backend/internal/db/datasaver/messages.go +++ b/ee/backend/internal/db/datasaver/messages.go @@ -58,7 +58,7 @@ func (mi *Saver) InsertMessage(msg Message) error { return mi.pg.InsertWebJSException(m) case *IntegrationEvent: return mi.pg.InsertWebIntegrationEvent(m) - case *FetchEvent: + case *Fetch: session, err := mi.pg.GetSession(sessionID) if err != nil { log.Printf("can't get session info for CH: %s", err) @@ -72,8 +72,8 @@ func (mi *Saver) InsertMessage(msg Message) error { } } } - return mi.pg.InsertWebFetchEvent(sessionID, m) - case *GraphQLEvent: + return mi.pg.InsertWebFetch(sessionID, m) + case *GraphQL: session, err := mi.pg.GetSession(sessionID) if err != nil { log.Printf("can't get session info for CH: %s", err) @@ -82,7 +82,7 @@ func (mi *Saver) InsertMessage(msg Message) error { log.Printf("can't insert graphQL event into clickhouse: %s", err) } } - return mi.pg.InsertWebGraphQLEvent(sessionID, m) + return mi.pg.InsertWebGraphQL(sessionID, m) case *SetPageLocation: return mi.pg.InsertSessionReferrer(sessionID, m.Referrer) diff --git a/ee/backend/pkg/db/clickhouse/connector.go b/ee/backend/pkg/db/clickhouse/connector.go index d882f793f..7fa78897a 100644 --- a/ee/backend/pkg/db/clickhouse/connector.go +++ b/ee/backend/pkg/db/clickhouse/connector.go @@ -27,9 +27,9 @@ type Connector interface { InsertWebErrorEvent(session *types.Session, msg *types.ErrorEvent) error InsertWebPerformanceTrackAggr(session *types.Session, msg *messages.PerformanceTrackAggr) error InsertAutocomplete(session *types.Session, msgType, msgValue string) error - InsertRequest(session *types.Session, msg *messages.FetchEvent, savePayload bool) error + InsertRequest(session *types.Session, msg *messages.Fetch, savePayload bool) error InsertCustom(session *types.Session, msg *messages.CustomEvent) error - InsertGraphQL(session *types.Session, msg *messages.GraphQLEvent) error + InsertGraphQL(session *types.Session, msg *messages.GraphQL) error InsertIssue(session *types.Session, msg *messages.IssueEvent) error } @@ -352,7 +352,7 @@ func (c *connectorImpl) InsertAutocomplete(session *types.Session, msgType, msgV return nil } -func (c *connectorImpl) InsertRequest(session *types.Session, msg *messages.FetchEvent, savePayload bool) error { +func (c *connectorImpl) InsertRequest(session *types.Session, msg *messages.Fetch, savePayload bool) error { urlMethod := url.EnsureMethod(msg.Method) if urlMethod == "" { return fmt.Errorf("can't parse http method. sess: %d, method: %s", session.SessionID, msg.Method) @@ -365,8 +365,8 @@ func (c *connectorImpl) InsertRequest(session *types.Session, msg *messages.Fetc if err := c.batches["requests"].Append( session.SessionID, uint16(session.ProjectID), - msg.MessageID, - datetime(msg.Timestamp), + msg.Meta().Index, + datetime(uint64(msg.Meta().Timestamp)), msg.URL, request, response, @@ -386,8 +386,8 @@ func (c *connectorImpl) InsertCustom(session *types.Session, msg *messages.Custo if err := c.batches["custom"].Append( session.SessionID, uint16(session.ProjectID), - msg.MessageID, - datetime(msg.Timestamp), + msg.Meta().Index, + datetime(uint64(msg.Meta().Timestamp)), msg.Name, msg.Payload, "CUSTOM", @@ -398,12 +398,12 @@ func (c *connectorImpl) InsertCustom(session *types.Session, msg *messages.Custo return nil } -func (c *connectorImpl) InsertGraphQL(session *types.Session, msg *messages.GraphQLEvent) error { +func (c *connectorImpl) InsertGraphQL(session *types.Session, msg *messages.GraphQL) error { if err := c.batches["graphql"].Append( session.SessionID, uint16(session.ProjectID), - msg.MessageID, - datetime(msg.Timestamp), + msg.Meta().Index, + datetime(uint64(msg.Meta().Timestamp)), msg.OperationName, nullableString(msg.Variables), nullableString(msg.Response), diff --git a/ee/connectors/msgcodec/messages.py b/ee/connectors/msgcodec/messages.py index 41181d924..cf426cb71 100644 --- a/ee/connectors/msgcodec/messages.py +++ b/ee/connectors/msgcodec/messages.py @@ -265,7 +265,7 @@ class IntegrationEvent(Message): self.payload = payload -class RawCustomEvent(Message): +class CustomEvent(Message): __id__ = 27 def __init__(self, name, payload): @@ -358,16 +358,6 @@ class ResourceEvent(Message): self.status = status -class CustomEvent(Message): - __id__ = 36 - - def __init__(self, message_id, timestamp, name, payload): - self.message_id = message_id - self.timestamp = timestamp - self.name = name - self.payload = payload - - class CSSInsertRule(Message): __id__ = 37 @@ -423,15 +413,6 @@ class StateAction(Message): self.type = type -class StateActionEvent(Message): - __id__ = 43 - - def __init__(self, message_id, timestamp, type): - self.message_id = message_id - self.timestamp = timestamp - self.type = type - - class Redux(Message): __id__ = 44 @@ -486,32 +467,6 @@ class PerformanceTrack(Message): self.used_js_heap_size = used_js_heap_size -class GraphQLEvent(Message): - __id__ = 50 - - def __init__(self, message_id, timestamp, operation_kind, operation_name, variables, response): - self.message_id = message_id - self.timestamp = timestamp - self.operation_kind = operation_kind - self.operation_name = operation_name - self.variables = variables - self.response = response - - -class FetchEvent(Message): - __id__ = 51 - - def __init__(self, message_id, timestamp, method, url, request, response, status, duration): - self.message_id = message_id - self.timestamp = timestamp - self.method = method - self.url = url - self.request = request - self.response = response - self.status = status - self.duration = duration - - class DOMDrop(Message): __id__ = 52 diff --git a/ee/connectors/msgcodec/msgcodec.py b/ee/connectors/msgcodec/msgcodec.py index 38bb6d3c2..249e5cb93 100644 --- a/ee/connectors/msgcodec/msgcodec.py +++ b/ee/connectors/msgcodec/msgcodec.py @@ -280,7 +280,7 @@ class MessageCodec(Codec): ) if message_id == 27: - return RawCustomEvent( + return CustomEvent( name=self.read_string(reader), payload=self.read_string(reader) ) @@ -356,14 +356,6 @@ class MessageCodec(Codec): status=self.read_uint(reader) ) - if message_id == 36: - return CustomEvent( - message_id=self.read_uint(reader), - timestamp=self.read_uint(reader), - name=self.read_string(reader), - payload=self.read_string(reader) - ) - if message_id == 37: return CSSInsertRule( id=self.read_uint(reader), @@ -407,13 +399,6 @@ class MessageCodec(Codec): type=self.read_string(reader) ) - if message_id == 43: - return StateActionEvent( - message_id=self.read_uint(reader), - timestamp=self.read_uint(reader), - type=self.read_string(reader) - ) - if message_id == 44: return Redux( action=self.read_string(reader), @@ -456,28 +441,6 @@ class MessageCodec(Codec): used_js_heap_size=self.read_uint(reader) ) - if message_id == 50: - return GraphQLEvent( - message_id=self.read_uint(reader), - timestamp=self.read_uint(reader), - operation_kind=self.read_string(reader), - operation_name=self.read_string(reader), - variables=self.read_string(reader), - response=self.read_string(reader) - ) - - if message_id == 51: - return FetchEvent( - message_id=self.read_uint(reader), - timestamp=self.read_uint(reader), - 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), - duration=self.read_uint(reader) - ) - if message_id == 52: return DOMDrop( timestamp=self.read_uint(reader) diff --git a/frontend/app/player/web/messages/tracker.gen.ts b/frontend/app/player/web/messages/tracker.gen.ts index f8c7b4f63..28fd88eff 100644 --- a/frontend/app/player/web/messages/tracker.gen.ts +++ b/frontend/app/player/web/messages/tracker.gen.ts @@ -161,7 +161,7 @@ type TrJSExceptionDeprecated = [ payload: string, ] -type TrRawCustomEvent = [ +type TrCustomEvent = [ type: 27, name: string, payload: string, @@ -412,7 +412,7 @@ type TrJSException = [ ] -export type TrackerMessage = TrBatchMetadata | TrPartitionedMessage | TrTimestamp | TrSetPageLocation | TrSetViewportSize | TrSetViewportScroll | TrCreateDocument | TrCreateElementNode | TrCreateTextNode | TrMoveNode | TrRemoveNode | TrSetNodeAttribute | TrRemoveNodeAttribute | TrSetNodeData | TrSetNodeScroll | TrSetInputTarget | TrSetInputValue | TrSetInputChecked | TrMouseMove | TrConsoleLog | TrPageLoadTiming | TrPageRenderTiming | TrJSExceptionDeprecated | TrRawCustomEvent | TrUserID | TrUserAnonymousID | TrMetadata | TrCSSInsertRule | TrCSSDeleteRule | TrFetch | TrProfiler | TrOTable | TrStateAction | TrRedux | TrVuex | TrMobX | TrNgRx | TrGraphQL | TrPerformanceTrack | TrResourceTiming | TrConnectionInformation | TrSetPageVisibility | TrLoadFontFace | TrSetNodeFocus | TrLongTask | TrSetNodeAttributeURLBased | TrSetCSSDataURLBased | TrTechnicalInfo | TrCustomIssue | TrCSSInsertRuleURLBased | TrMouseClick | TrCreateIFrameDocument | TrAdoptedSSReplaceURLBased | TrAdoptedSSInsertRuleURLBased | TrAdoptedSSDeleteRule | TrAdoptedSSAddOwner | TrAdoptedSSRemoveOwner | TrZustand | TrJSException +export type TrackerMessage = TrBatchMetadata | TrPartitionedMessage | TrTimestamp | TrSetPageLocation | TrSetViewportSize | TrSetViewportScroll | TrCreateDocument | TrCreateElementNode | TrCreateTextNode | TrMoveNode | TrRemoveNode | TrSetNodeAttribute | TrRemoveNodeAttribute | TrSetNodeData | TrSetNodeScroll | TrSetInputTarget | TrSetInputValue | TrSetInputChecked | TrMouseMove | TrConsoleLog | TrPageLoadTiming | TrPageRenderTiming | TrJSExceptionDeprecated | TrCustomEvent | TrUserID | TrUserAnonymousID | TrMetadata | TrCSSInsertRule | TrCSSDeleteRule | TrFetch | TrProfiler | TrOTable | TrStateAction | TrRedux | TrVuex | TrMobX | TrNgRx | TrGraphQL | TrPerformanceTrack | TrResourceTiming | TrConnectionInformation | TrSetPageVisibility | TrLoadFontFace | TrSetNodeFocus | TrLongTask | TrSetNodeAttributeURLBased | TrSetCSSDataURLBased | TrTechnicalInfo | TrCustomIssue | TrCSSInsertRuleURLBased | TrMouseClick | TrCreateIFrameDocument | TrAdoptedSSReplaceURLBased | TrAdoptedSSInsertRuleURLBased | TrAdoptedSSDeleteRule | TrAdoptedSSAddOwner | TrAdoptedSSRemoveOwner | TrZustand | TrJSException export default function translate(tMsg: TrackerMessage): RawMessage | null { switch(tMsg[0]) { diff --git a/mobs/messages.rb b/mobs/messages.rb index 60bde0626..d63644a35 100644 --- a/mobs/messages.rb +++ b/mobs/messages.rb @@ -1,6 +1,6 @@ # Special one for Batch Metadata. Message id could define the version -# Depricated since tracker 3.6.0 in favor of BatchMetadata +# Deprecated since tracker 3.6.0 in favor of BatchMetadata message 80, 'BatchMeta', :replayer => false, :tracker => false do uint 'PageNo' uint 'FirstIndex' @@ -62,7 +62,7 @@ message 6, 'SetViewportScroll' do int 'X' int 'Y' end -# (should be) Depricated sinse tracker ?.?.? in favor of CreateDocument(id=2) +# (should be) Deprecated sinse tracker ?.?.? in favor of CreateDocument(id=2) # in order to use Document as a default root node instead of the documentElement message 7, 'CreateDocument' do end @@ -159,7 +159,7 @@ message 26, 'IntegrationEvent', :tracker => false, :replayer => false do string 'Message' string 'Payload' end -message 27, 'RawCustomEvent', :replayer => false do +message 27, 'CustomEvent', :replayer => false do string 'Name' string 'Payload' end @@ -206,6 +206,7 @@ message 33, 'ClickEvent', :tracker => false, :replayer => false do string 'Label' string 'Selector' end +# removed (backend-only) # message 34, 'ErrorEvent', :tracker => false, :replayer => false do # uint 'MessageID' # uint 'Timestamp' @@ -228,12 +229,13 @@ message 35, 'ResourceEvent', :tracker => false, :replayer => false do string 'Method' uint 'Status' end -message 36, 'CustomEvent', :tracker => false, :replayer => false do - uint 'MessageID' - uint 'Timestamp' - string 'Name' - string 'Payload' -end +# removed (backend-only) +# message 36, 'CustomEvent', :tracker => false, :replayer => false do +# uint 'MessageID' +# uint 'Timestamp' +# string 'Name' +# string 'Payload' +# end # deprecated since 4.0.2 in favor of AdoptedSSInsertRule + AdoptedSSAddOwner message 37, 'CSSInsertRule' do uint 'ID' @@ -265,15 +267,15 @@ message 41, 'OTable', :replayer => :devtools do string 'Key' string 'Value' end -# Do we use that? message 42, 'StateAction', :replayer => false do string 'Type' end -message 43, 'StateActionEvent', :tracker => false, :replayer => false do - uint 'MessageID' - uint 'Timestamp' - string 'Type' -end +# removed (backend-only) +# message 43, 'StateActionEvent', :tracker => false, :replayer => false do +# uint 'MessageID' +# uint 'Timestamp' +# string 'Type' +# end message 44, 'Redux', :replayer => :devtools do string 'Action' string 'State' @@ -304,25 +306,26 @@ message 49, 'PerformanceTrack' do #, :replayer => :devtools --> requires player uint 'TotalJSHeapSize' uint 'UsedJSHeapSize' end -# next 2 should be removed after refactoring backend/pkg/handlers/custom/eventMapper.go (move "wrapping" logic to pg connector insertion) -message 50, 'GraphQLEvent', :tracker => false, :replayer => false do - uint 'MessageID' - uint 'Timestamp' - string 'OperationKind' - string 'OperationName' - string 'Variables' - string 'Response' -end -message 51, 'FetchEvent', :tracker => false, :replayer => false do - uint 'MessageID' - uint 'Timestamp' - string 'Method' - string 'URL' - string 'Request' - string 'Response' - uint 'Status' - uint 'Duration' -end +# removed (backend-only) +# message 50, 'GraphQLEvent', :tracker => false, :replayer => false do +# uint 'MessageID' +# uint 'Timestamp' +# string 'OperationKind' +# string 'OperationName' +# string 'Variables' +# string 'Response' +# end +# removed (backend-only) +# message 51, 'FetchEvent', :tracker => false, :replayer => false do +# uint 'MessageID' +# uint 'Timestamp' +# string 'Method' +# string 'URL' +# string 'Request' +# string 'Response' +# uint 'Status' +# uint 'Duration' +# end message 52, 'DOMDrop', :tracker => false, :replayer => false do uint 'Timestamp' end @@ -372,7 +375,7 @@ message 58, 'SetNodeFocus' do int 'ID' end -#Depricated (since 3.0.?) +#Deprecated (since 3.0.?) message 59, 'LongTask' do uint 'Timestamp' uint 'Duration' diff --git a/mobs/templates/backend~pkg~messages~read-message.go.erb b/mobs/templates/backend~pkg~messages~read-message.go.erb index 67cff7344..f871f1cea 100644 --- a/mobs/templates/backend~pkg~messages~read-message.go.erb +++ b/mobs/templates/backend~pkg~messages~read-message.go.erb @@ -3,7 +3,6 @@ package messages import ( "fmt" - "io" ) <% $messages.each do |msg| %> func Decode<%= msg.name %>(reader BytesReader) (Message, error) { diff --git a/tracker/tracker/src/common/messages.gen.ts b/tracker/tracker/src/common/messages.gen.ts index e5f7fe28c..9dbdb755a 100644 --- a/tracker/tracker/src/common/messages.gen.ts +++ b/tracker/tracker/src/common/messages.gen.ts @@ -25,7 +25,7 @@ export declare const enum Type { PageLoadTiming = 23, PageRenderTiming = 24, JSExceptionDeprecated = 25, - RawCustomEvent = 27, + CustomEvent = 27, UserID = 28, UserAnonymousID = 29, Metadata = 30, @@ -220,8 +220,8 @@ export type JSExceptionDeprecated = [ /*payload:*/ string, ] -export type RawCustomEvent = [ - /*type:*/ Type.RawCustomEvent, +export type CustomEvent = [ + /*type:*/ Type.CustomEvent, /*name:*/ string, /*payload:*/ string, ] @@ -471,5 +471,5 @@ export type JSException = [ ] -type Message = BatchMetadata | PartitionedMessage | Timestamp | SetPageLocation | SetViewportSize | SetViewportScroll | CreateDocument | CreateElementNode | CreateTextNode | MoveNode | RemoveNode | SetNodeAttribute | RemoveNodeAttribute | SetNodeData | SetNodeScroll | SetInputTarget | SetInputValue | SetInputChecked | MouseMove | ConsoleLog | PageLoadTiming | PageRenderTiming | JSExceptionDeprecated | RawCustomEvent | UserID | UserAnonymousID | Metadata | CSSInsertRule | CSSDeleteRule | Fetch | Profiler | OTable | StateAction | Redux | Vuex | MobX | NgRx | GraphQL | PerformanceTrack | ResourceTiming | ConnectionInformation | SetPageVisibility | LoadFontFace | SetNodeFocus | LongTask | SetNodeAttributeURLBased | SetCSSDataURLBased | TechnicalInfo | CustomIssue | CSSInsertRuleURLBased | MouseClick | CreateIFrameDocument | AdoptedSSReplaceURLBased | AdoptedSSInsertRuleURLBased | AdoptedSSDeleteRule | AdoptedSSAddOwner | AdoptedSSRemoveOwner | Zustand | JSException +type Message = BatchMetadata | PartitionedMessage | Timestamp | SetPageLocation | SetViewportSize | SetViewportScroll | CreateDocument | CreateElementNode | CreateTextNode | MoveNode | RemoveNode | SetNodeAttribute | RemoveNodeAttribute | SetNodeData | SetNodeScroll | SetInputTarget | SetInputValue | SetInputChecked | MouseMove | ConsoleLog | PageLoadTiming | PageRenderTiming | JSExceptionDeprecated | CustomEvent | UserID | UserAnonymousID | Metadata | CSSInsertRule | CSSDeleteRule | Fetch | Profiler | OTable | StateAction | Redux | Vuex | MobX | NgRx | GraphQL | PerformanceTrack | ResourceTiming | ConnectionInformation | SetPageVisibility | LoadFontFace | SetNodeFocus | LongTask | SetNodeAttributeURLBased | SetCSSDataURLBased | TechnicalInfo | CustomIssue | CSSInsertRuleURLBased | MouseClick | CreateIFrameDocument | AdoptedSSReplaceURLBased | AdoptedSSInsertRuleURLBased | AdoptedSSDeleteRule | AdoptedSSAddOwner | AdoptedSSRemoveOwner | Zustand | JSException export default Message diff --git a/tracker/tracker/src/main/app/messages.gen.ts b/tracker/tracker/src/main/app/messages.gen.ts index b9f235588..c9f42e610 100644 --- a/tracker/tracker/src/main/app/messages.gen.ts +++ b/tracker/tracker/src/main/app/messages.gen.ts @@ -294,12 +294,12 @@ export function JSExceptionDeprecated( ] } -export function RawCustomEvent( +export function CustomEvent( name: string, payload: string, -): Messages.RawCustomEvent { +): Messages.CustomEvent { return [ - Messages.Type.RawCustomEvent, + Messages.Type.CustomEvent, name, payload, ] diff --git a/tracker/tracker/src/webworker/MessageEncoder.gen.ts b/tracker/tracker/src/webworker/MessageEncoder.gen.ts index c4e2d70d6..74e51f528 100644 --- a/tracker/tracker/src/webworker/MessageEncoder.gen.ts +++ b/tracker/tracker/src/webworker/MessageEncoder.gen.ts @@ -102,7 +102,7 @@ export default class MessageEncoder extends PrimitiveEncoder { return this.string(msg[1]) && this.string(msg[2]) && this.string(msg[3]) break - case Messages.Type.RawCustomEvent: + case Messages.Type.CustomEvent: return this.string(msg[1]) && this.string(msg[2]) break