feat(proto): removed a part of deprecated messages (min supported tracker version is 6.0.0)

This commit is contained in:
Alexander 2025-03-06 13:49:18 +01:00
parent 74146eecf1
commit 6dc3dcfd4e
25 changed files with 79 additions and 1323 deletions

View file

@ -64,7 +64,7 @@ func main() {
messages.MsgMetadata, messages.MsgIssueEvent, messages.MsgSessionStart, messages.MsgSessionEnd, messages.MsgMetadata, messages.MsgIssueEvent, messages.MsgSessionStart, messages.MsgSessionEnd,
messages.MsgUserID, messages.MsgUserAnonymousID, messages.MsgIntegrationEvent, messages.MsgPerformanceTrackAggr, messages.MsgUserID, messages.MsgUserAnonymousID, messages.MsgIntegrationEvent, messages.MsgPerformanceTrackAggr,
messages.MsgJSException, messages.MsgResourceTiming, messages.MsgCustomEvent, messages.MsgCustomIssue, 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.MsgMouseClickDeprecated, messages.MsgSetPageLocation, messages.MsgSetPageLocationDeprecated,
messages.MsgPageLoadTiming, messages.MsgPageRenderTiming, messages.MsgPageLoadTiming, messages.MsgPageRenderTiming,
messages.MsgPageEvent, messages.MsgPageEventDeprecated, messages.MsgMouseThrashing, messages.MsgInputChange, messages.MsgPageEvent, messages.MsgPageEventDeprecated, messages.MsgMouseThrashing, messages.MsgInputChange,

View file

@ -98,7 +98,6 @@ func main() {
// Process assets // Process assets
if msg.TypeID() == messages.MsgSetNodeAttributeURLBased || if msg.TypeID() == messages.MsgSetNodeAttributeURLBased ||
msg.TypeID() == messages.MsgSetCSSDataURLBased || msg.TypeID() == messages.MsgSetCSSDataURLBased ||
msg.TypeID() == messages.MsgCSSInsertRuleURLBased ||
msg.TypeID() == messages.MsgAdoptedSSReplaceURLBased || msg.TypeID() == messages.MsgAdoptedSSReplaceURLBased ||
msg.TypeID() == messages.MsgAdoptedSSInsertRuleURLBased { msg.TypeID() == messages.MsgAdoptedSSInsertRuleURLBased {
m := msg.Decode() m := msg.Decode()

View file

@ -131,17 +131,6 @@ func (e *AssetsCache) ParseAssets(msg messages.Message) messages.Message {
} }
newMsg.SetMeta(msg.Meta()) newMsg.SetMeta(msg.Meta())
return newMsg 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: case *messages.AdoptedSSReplaceURLBased:
if e.shouldSkipAsset(m.BaseURL) { if e.shouldSkipAsset(m.BaseURL) {
return msg return msg

View file

@ -77,8 +77,6 @@ func (d *DeadClickDetector) Handle(message Message, timestamp uint64) Message {
*MoveNode, *MoveNode,
*RemoveNode, *RemoveNode,
*SetCSSData, *SetCSSData,
*CSSInsertRule,
*CSSDeleteRule,
*SetInputValue, *SetInputValue,
*SetInputChecked: *SetInputChecked:
return d.Build() return d.Build()

View file

@ -2,7 +2,7 @@
package messages package messages
func IsReplayerType(id int) bool { 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 { func IsMobileType(id int) bool {
@ -10,5 +10,5 @@ func IsMobileType(id int) bool {
} }
func IsDOMType(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
} }

View file

@ -44,9 +44,8 @@ func NewMessageIterator(log logger.Logger, messageHandler MessageHandler, messag
iter.filter = filter iter.filter = filter
} }
iter.preFilter = map[int]struct{}{ iter.preFilter = map[int]struct{}{
MsgBatchMetadata: {}, MsgBatchMeta: {}, MsgTimestamp: {}, MsgBatchMetadata: {}, MsgTimestamp: {}, MsgSessionStart: {},
MsgSessionStart: {}, MsgSessionEnd: {}, MsgSetPageLocation: {}, MsgSessionEnd: {}, MsgSetPageLocation: {}, MsgMobileBatchMeta: {},
MsgMobileBatchMeta: {},
} }
return iter return iter
} }
@ -152,20 +151,6 @@ func (i *messageIteratorImpl) preprocessing(msg Message) error {
i.version = m.Version i.version = m.Version
i.batchInfo.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: case *Timestamp:
i.messageInfo.Timestamp = m.Timestamp i.messageInfo.Timestamp = m.Timestamp
if m.Timestamp == 0 { if m.Timestamp == 0 {

View file

@ -2,34 +2,6 @@ package messages
func transformDeprecated(msg Message) Message { func transformDeprecated(msg Message) Message {
switch m := msg.(type) { 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: case *ResourceTimingDeprecated:
return &ResourceTiming{ return &ResourceTiming{
Timestamp: m.Timestamp, Timestamp: m.Timestamp,

View file

@ -4,7 +4,6 @@ package messages
const ( const (
MsgTimestamp = 0 MsgTimestamp = 0
MsgSessionStart = 1 MsgSessionStart = 1
MsgSessionEndDeprecated = 3
MsgSetPageLocationDeprecated = 4 MsgSetPageLocationDeprecated = 4
MsgSetViewportSize = 5 MsgSetViewportSize = 5
MsgSetViewportScroll = 6 MsgSetViewportScroll = 6
@ -26,7 +25,6 @@ const (
MsgConsoleLog = 22 MsgConsoleLog = 22
MsgPageLoadTiming = 23 MsgPageLoadTiming = 23
MsgPageRenderTiming = 24 MsgPageRenderTiming = 24
MsgJSExceptionDeprecated = 25
MsgIntegrationEvent = 26 MsgIntegrationEvent = 26
MsgCustomEvent = 27 MsgCustomEvent = 27
MsgUserID = 28 MsgUserID = 28
@ -37,9 +35,6 @@ const (
MsgPageEvent = 33 MsgPageEvent = 33
MsgStringDictGlobal = 34 MsgStringDictGlobal = 34
MsgSetNodeAttributeDictGlobal = 35 MsgSetNodeAttributeDictGlobal = 35
MsgCSSInsertRule = 37
MsgCSSDeleteRule = 38
MsgFetch = 39
MsgProfiler = 40 MsgProfiler = 40
MsgOTable = 41 MsgOTable = 41
MsgStateAction = 42 MsgStateAction = 42
@ -59,14 +54,11 @@ const (
MsgPerformanceTrackAggr = 56 MsgPerformanceTrackAggr = 56
MsgLoadFontFace = 57 MsgLoadFontFace = 57
MsgSetNodeFocus = 58 MsgSetNodeFocus = 58
MsgLongTask = 59
MsgSetNodeAttributeURLBased = 60 MsgSetNodeAttributeURLBased = 60
MsgSetCSSDataURLBased = 61 MsgSetCSSDataURLBased = 61
MsgIssueEventDeprecated = 62
MsgTechnicalInfo = 63 MsgTechnicalInfo = 63
MsgCustomIssue = 64 MsgCustomIssue = 64
MsgAssetCache = 66 MsgAssetCache = 66
MsgCSSInsertRuleURLBased = 67
MsgMouseClick = 68 MsgMouseClick = 68
MsgMouseClickDeprecated = 69 MsgMouseClickDeprecated = 69
MsgCreateIFrameDocument = 70 MsgCreateIFrameDocument = 70
@ -79,7 +71,6 @@ const (
MsgAdoptedSSRemoveOwner = 77 MsgAdoptedSSRemoveOwner = 77
MsgJSException = 78 MsgJSException = 78
MsgZustand = 79 MsgZustand = 79
MsgBatchMeta = 80
MsgBatchMetadata = 81 MsgBatchMetadata = 81
MsgPartitionedMessage = 82 MsgPartitionedMessage = 82
MsgNetworkRequest = 83 MsgNetworkRequest = 83
@ -193,27 +184,6 @@ func (msg *SessionStart) TypeID() int {
return 1 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 { type SetPageLocationDeprecated struct {
message message
URL string URL string
@ -738,31 +708,6 @@ func (msg *PageRenderTiming) TypeID() int {
return 24 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 { type IntegrationEvent struct {
message message
Timestamp uint64 Timestamp uint64
@ -1065,87 +1010,6 @@ func (msg *SetNodeAttributeDictGlobal) TypeID() int {
return 35 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 { type Profiler struct {
message message
Name string Name string
@ -1639,39 +1503,6 @@ func (msg *SetNodeFocus) TypeID() int {
return 58 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 { type SetNodeAttributeURLBased struct {
message message
ID uint64 ID uint64
@ -1724,37 +1555,6 @@ func (msg *SetCSSDataURLBased) TypeID() int {
return 61 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 { type TechnicalInfo struct {
message message
Type string Type string
@ -1822,33 +1622,6 @@ func (msg *AssetCache) TypeID() int {
return 66 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 { type MouseClick struct {
message message
ID uint64 ID uint64
@ -2149,31 +1922,6 @@ func (msg *Zustand) TypeID() int {
return 79 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 { type BatchMetadata struct {
message message
Version uint64 Version uint64

View file

@ -68,15 +68,6 @@ func DecodeSessionStart(reader BytesReader) (Message, error) {
return msg, err 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) { func DecodeSetPageLocationDeprecated(reader BytesReader) (Message, error) {
var err error = nil var err error = nil
msg := &SetPageLocationDeprecated{} msg := &SetPageLocationDeprecated{}
@ -390,21 +381,6 @@ func DecodePageRenderTiming(reader BytesReader) (Message, error) {
return msg, err 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) { func DecodeIntegrationEvent(reader BytesReader) (Message, error) {
var err error = nil var err error = nil
msg := &IntegrationEvent{} msg := &IntegrationEvent{}
@ -633,60 +609,6 @@ func DecodeSetNodeAttributeDictGlobal(reader BytesReader) (Message, error) {
return msg, err 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) { func DecodeProfiler(reader BytesReader) (Message, error) {
var err error = nil var err error = nil
msg := &Profiler{} msg := &Profiler{}
@ -999,33 +921,6 @@ func DecodeSetNodeFocus(reader BytesReader) (Message, error) {
return msg, err 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) { func DecodeSetNodeAttributeURLBased(reader BytesReader) (Message, error) {
var err error = nil var err error = nil
msg := &SetNodeAttributeURLBased{} msg := &SetNodeAttributeURLBased{}
@ -1059,30 +954,6 @@ func DecodeSetCSSDataURLBased(reader BytesReader) (Message, error) {
return msg, err 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) { func DecodeTechnicalInfo(reader BytesReader) (Message, error) {
var err error = nil var err error = nil
msg := &TechnicalInfo{} msg := &TechnicalInfo{}
@ -1116,24 +987,6 @@ func DecodeAssetCache(reader BytesReader) (Message, error) {
return msg, err 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) { func DecodeMouseClick(reader BytesReader) (Message, error) {
var err error = nil var err error = nil
msg := &MouseClick{} msg := &MouseClick{}
@ -1314,21 +1167,6 @@ func DecodeZustand(reader BytesReader) (Message, error) {
return msg, err 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) { func DecodeBatchMetadata(reader BytesReader) (Message, error) {
var err error = nil var err error = nil
msg := &BatchMetadata{} msg := &BatchMetadata{}
@ -2088,8 +1926,6 @@ func ReadMessage(t uint64, reader BytesReader) (Message, error) {
return DecodeTimestamp(reader) return DecodeTimestamp(reader)
case 1: case 1:
return DecodeSessionStart(reader) return DecodeSessionStart(reader)
case 3:
return DecodeSessionEndDeprecated(reader)
case 4: case 4:
return DecodeSetPageLocationDeprecated(reader) return DecodeSetPageLocationDeprecated(reader)
case 5: case 5:
@ -2132,8 +1968,6 @@ func ReadMessage(t uint64, reader BytesReader) (Message, error) {
return DecodePageLoadTiming(reader) return DecodePageLoadTiming(reader)
case 24: case 24:
return DecodePageRenderTiming(reader) return DecodePageRenderTiming(reader)
case 25:
return DecodeJSExceptionDeprecated(reader)
case 26: case 26:
return DecodeIntegrationEvent(reader) return DecodeIntegrationEvent(reader)
case 27: case 27:
@ -2154,12 +1988,6 @@ func ReadMessage(t uint64, reader BytesReader) (Message, error) {
return DecodeStringDictGlobal(reader) return DecodeStringDictGlobal(reader)
case 35: case 35:
return DecodeSetNodeAttributeDictGlobal(reader) return DecodeSetNodeAttributeDictGlobal(reader)
case 37:
return DecodeCSSInsertRule(reader)
case 38:
return DecodeCSSDeleteRule(reader)
case 39:
return DecodeFetch(reader)
case 40: case 40:
return DecodeProfiler(reader) return DecodeProfiler(reader)
case 41: case 41:
@ -2198,22 +2026,16 @@ func ReadMessage(t uint64, reader BytesReader) (Message, error) {
return DecodeLoadFontFace(reader) return DecodeLoadFontFace(reader)
case 58: case 58:
return DecodeSetNodeFocus(reader) return DecodeSetNodeFocus(reader)
case 59:
return DecodeLongTask(reader)
case 60: case 60:
return DecodeSetNodeAttributeURLBased(reader) return DecodeSetNodeAttributeURLBased(reader)
case 61: case 61:
return DecodeSetCSSDataURLBased(reader) return DecodeSetCSSDataURLBased(reader)
case 62:
return DecodeIssueEventDeprecated(reader)
case 63: case 63:
return DecodeTechnicalInfo(reader) return DecodeTechnicalInfo(reader)
case 64: case 64:
return DecodeCustomIssue(reader) return DecodeCustomIssue(reader)
case 66: case 66:
return DecodeAssetCache(reader) return DecodeAssetCache(reader)
case 67:
return DecodeCSSInsertRuleURLBased(reader)
case 68: case 68:
return DecodeMouseClick(reader) return DecodeMouseClick(reader)
case 69: case 69:
@ -2238,8 +2060,6 @@ func ReadMessage(t uint64, reader BytesReader) (Message, error) {
return DecodeJSException(reader) return DecodeJSException(reader)
case 79: case 79:
return DecodeZustand(reader) return DecodeZustand(reader)
case 80:
return DecodeBatchMeta(reader)
case 81: case 81:
return DecodeBatchMetadata(reader) return DecodeBatchMetadata(reader)
case 82: case 82:

View file

@ -89,15 +89,13 @@ func (m *messageReaderImpl) Parse() (err error) {
if err != nil { if err != nil {
return fmt.Errorf("read message err: %s", err) return fmt.Errorf("read message err: %s", err)
} }
if m.msgType == MsgBatchMeta || m.msgType == MsgBatchMetadata { if m.msgType == MsgBatchMetadata {
if len(m.list) > 0 { if len(m.list) > 0 {
return fmt.Errorf("batch meta not at the start of batch") return fmt.Errorf("batch meta not at the start of batch")
} }
switch message := msg.(type) { switch message := msg.(type) {
case *BatchMetadata: case *BatchMetadata:
m.version = int(message.Version) m.version = int(message.Version)
case *BatchMeta:
m.version = 0
} }
if m.version != 1 { if m.version != 1 {
// Unsupported tracker version, reset reader // Unsupported tracker version, reset reader

View file

@ -79,31 +79,34 @@ func (e *handlersImpl) GetAll() []*api.Description {
} }
} }
func getSessionTimestamp(req *StartSessionRequest, startTimeMili int64) (ts uint64) { func getSessionTimestamp(req *StartSessionRequest, startTimeMili int64) uint64 {
ts = uint64(req.Timestamp)
if req.IsOffline { 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 { if err != nil {
return return err
} }
ver := req.TrackerVersion
parts := strings.Split(ver, "-") parts := strings.Split(ver, "-")
if len(parts) > 1 { if len(parts) > 1 {
ver = parts[0] ver = parts[0]
} }
v, err := semver.NewVersion(ver) v, err := semver.NewVersion(ver)
if err != nil { if err != nil {
return return err
} }
if c.Check(v) { if !c.Check(v) {
ts = uint64(startTimeMili) return errors.New("unsupported tracker version")
if req.BufferDiff > 0 && req.BufferDiff < 5*60*1000 {
ts -= req.BufferDiff
} }
} return nil
return
} }
func (e *handlersImpl) startSessionHandlerWeb(w http.ResponseWriter, r *http.Request) { 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 // Add tracker version to context
r = r.WithContext(context.WithValue(r.Context(), "tracker", req.TrackerVersion)) 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 // Handler's logic
if req.ProjectKey == nil { if req.ProjectKey == nil {

View file

@ -35,13 +35,6 @@ class SessionStart(Message):
self.user_id = user_id self.user_id = user_id
class SessionEndDeprecated(Message):
__id__ = 3
def __init__(self, timestamp):
self.timestamp = timestamp
class SetPageLocationDeprecated(Message): class SetPageLocationDeprecated(Message):
__id__ = 4 __id__ = 4
@ -231,15 +224,6 @@ class PageRenderTiming(Message):
self.time_to_interactive = time_to_interactive 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): class IntegrationEvent(Message):
__id__ = 26 __id__ = 26
@ -339,34 +323,21 @@ class PageEvent(Message):
self.web_vitals = web_vitals self.web_vitals = web_vitals
class CSSInsertRule(Message): class StringDictGlobal(Message):
__id__ = 37 __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.id = id
self.rule = rule self.name = name
self.index = index self.value = value
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
class Profiler(Message): class Profiler(Message):
@ -549,19 +520,6 @@ class SetNodeFocus(Message):
self.id = id 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): class SetNodeAttributeURLBased(Message):
__id__ = 60 __id__ = 60
@ -581,18 +539,6 @@ class SetCSSDataURLBased(Message):
self.base_url = base_url 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): class TechnicalInfo(Message):
__id__ = 63 __id__ = 63
@ -616,16 +562,6 @@ class AssetCache(Message):
self.url = url 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): class MouseClick(Message):
__id__ = 68 __id__ = 68
@ -734,15 +670,6 @@ class Zustand(Message):
self.state = state 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): class BatchMetadata(Message):
__id__ = 81 __id__ = 81

View file

@ -58,15 +58,6 @@ cdef class SessionStart(PyMessage):
self.user_id = user_id 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 class SetPageLocationDeprecated(PyMessage):
cdef public int __id__ cdef public int __id__
cdef public str url cdef public str url
@ -340,19 +331,6 @@ cdef class PageRenderTiming(PyMessage):
self.time_to_interactive = time_to_interactive 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 class IntegrationEvent(PyMessage):
cdef public int __id__ cdef public int __id__
cdef public unsigned long timestamp cdef public unsigned long timestamp
@ -511,49 +489,28 @@ cdef class PageEvent(PyMessage):
self.web_vitals = web_vitals 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 int __id__
cdef public unsigned long id cdef public unsigned long id
cdef public str rule cdef public unsigned long name
cdef public unsigned long index cdef public unsigned long value
def __init__(self, unsigned long id, str rule, unsigned long index): def __init__(self, unsigned long id, unsigned long name, unsigned long value):
self.__id__ = 37 self.__id__ = 35
self.id = id self.id = id
self.rule = rule self.name = name
self.index = index self.value = value
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
cdef class Profiler(PyMessage): cdef class Profiler(PyMessage):
@ -821,27 +778,6 @@ cdef class SetNodeFocus(PyMessage):
self.id = id 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 class SetNodeAttributeURLBased(PyMessage):
cdef public int __id__ cdef public int __id__
cdef public unsigned long id cdef public unsigned long id
@ -870,25 +806,6 @@ cdef class SetCSSDataURLBased(PyMessage):
self.base_url = base_url 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 class TechnicalInfo(PyMessage):
cdef public int __id__ cdef public int __id__
cdef public str type cdef public str type
@ -920,21 +837,6 @@ cdef class AssetCache(PyMessage):
self.url = url 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 class MouseClick(PyMessage):
cdef public int __id__ cdef public int __id__
cdef public unsigned long id cdef public unsigned long id
@ -1091,19 +993,6 @@ cdef class Zustand(PyMessage):
self.state = state 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 class BatchMetadata(PyMessage):
cdef public int __id__ cdef public int __id__
cdef public unsigned long version cdef public unsigned long version

View file

@ -118,11 +118,6 @@ class MessageCodec(Codec):
user_id=self.read_string(reader) user_id=self.read_string(reader)
) )
if message_id == 3:
return SessionEndDeprecated(
timestamp=self.read_uint(reader)
)
if message_id == 4: if message_id == 4:
return SetPageLocationDeprecated( return SetPageLocationDeprecated(
url=self.read_string(reader), url=self.read_string(reader),
@ -270,13 +265,6 @@ class MessageCodec(Codec):
time_to_interactive=self.read_uint(reader) 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: if message_id == 26:
return IntegrationEvent( return IntegrationEvent(
timestamp=self.read_uint(reader), timestamp=self.read_uint(reader),
@ -360,28 +348,17 @@ class MessageCodec(Codec):
web_vitals=self.read_string(reader) web_vitals=self.read_string(reader)
) )
if message_id == 37: if message_id == 34:
return CSSInsertRule( return StringDictGlobal(
id=self.read_uint(reader), key=self.read_uint(reader),
rule=self.read_string(reader), value=self.read_string(reader)
index=self.read_uint(reader)
) )
if message_id == 38: if message_id == 35:
return CSSDeleteRule( return SetNodeAttributeDictGlobal(
id=self.read_uint(reader), id=self.read_uint(reader),
index=self.read_uint(reader) name=self.read_uint(reader),
) value=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)
) )
if message_id == 40: if message_id == 40:
@ -526,17 +503,6 @@ class MessageCodec(Codec):
id=self.read_int(reader) 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: if message_id == 60:
return SetNodeAttributeURLBased( return SetNodeAttributeURLBased(
id=self.read_uint(reader), id=self.read_uint(reader),
@ -552,16 +518,6 @@ class MessageCodec(Codec):
base_url=self.read_string(reader) 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: if message_id == 63:
return TechnicalInfo( return TechnicalInfo(
type=self.read_string(reader), type=self.read_string(reader),
@ -579,14 +535,6 @@ class MessageCodec(Codec):
url=self.read_string(reader) 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: if message_id == 68:
return MouseClick( return MouseClick(
id=self.read_uint(reader), id=self.read_uint(reader),
@ -671,13 +619,6 @@ class MessageCodec(Codec):
state=self.read_string(reader) 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: if message_id == 81:
return BatchMetadata( return BatchMetadata(
version=self.read_uint(reader), version=self.read_uint(reader),

View file

@ -216,11 +216,6 @@ cdef class MessageCodec:
user_id=self.read_string(reader) user_id=self.read_string(reader)
) )
if message_id == 3:
return SessionEndDeprecated(
timestamp=self.read_uint(reader)
)
if message_id == 4: if message_id == 4:
return SetPageLocationDeprecated( return SetPageLocationDeprecated(
url=self.read_string(reader), url=self.read_string(reader),
@ -368,13 +363,6 @@ cdef class MessageCodec:
time_to_interactive=self.read_uint(reader) 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: if message_id == 26:
return IntegrationEvent( return IntegrationEvent(
timestamp=self.read_uint(reader), timestamp=self.read_uint(reader),
@ -458,28 +446,17 @@ cdef class MessageCodec:
web_vitals=self.read_string(reader) web_vitals=self.read_string(reader)
) )
if message_id == 37: if message_id == 34:
return CSSInsertRule( return StringDictGlobal(
id=self.read_uint(reader), key=self.read_uint(reader),
rule=self.read_string(reader), value=self.read_string(reader)
index=self.read_uint(reader)
) )
if message_id == 38: if message_id == 35:
return CSSDeleteRule( return SetNodeAttributeDictGlobal(
id=self.read_uint(reader), id=self.read_uint(reader),
index=self.read_uint(reader) name=self.read_uint(reader),
) value=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)
) )
if message_id == 40: if message_id == 40:
@ -624,17 +601,6 @@ cdef class MessageCodec:
id=self.read_int(reader) 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: if message_id == 60:
return SetNodeAttributeURLBased( return SetNodeAttributeURLBased(
id=self.read_uint(reader), id=self.read_uint(reader),
@ -650,16 +616,6 @@ cdef class MessageCodec:
base_url=self.read_string(reader) 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: if message_id == 63:
return TechnicalInfo( return TechnicalInfo(
type=self.read_string(reader), type=self.read_string(reader),
@ -677,14 +633,6 @@ cdef class MessageCodec:
url=self.read_string(reader) 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: if message_id == 68:
return MouseClick( return MouseClick(
id=self.read_uint(reader), id=self.read_uint(reader),
@ -769,13 +717,6 @@ cdef class MessageCodec:
state=self.read_string(reader) 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: if message_id == 81:
return BatchMetadata( return BatchMetadata(
version=self.read_uint(reader), version=self.read_uint(reader),

View file

@ -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: { case 40: {
const name = this.readString(); if (name === null) { return resetPointer() } const name = this.readString(); if (name === null) { return resetPointer() }
const duration = this.readUint(); if (duration === 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: { case 60: {
const id = this.readUint(); if (id === null) { return resetPointer() } const id = this.readUint(); if (id === null) { return resetPointer() }
const name = this.readString(); if (name === 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: { case 68: {
const id = this.readUint(); if (id === null) { return resetPointer() } const id = this.readUint(); if (id === null) { return resetPointer() }
const hesitationTime = this.readUint(); if (hesitationTime === null) { return resetPointer() } const hesitationTime = this.readUint(); if (hesitationTime === null) { return resetPointer() }

View file

@ -4,7 +4,7 @@
import { MType } from './raw.gen' 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 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) { export function isDOMType(t: MType) {
return DOM_TYPES.includes(t) return DOM_TYPES.includes(t)
} }

View file

@ -25,9 +25,6 @@ import type {
RawConsoleLog, RawConsoleLog,
RawStringDictGlobal, RawStringDictGlobal,
RawSetNodeAttributeDictGlobal, RawSetNodeAttributeDictGlobal,
RawCssInsertRule,
RawCssDeleteRule,
RawFetch,
RawProfiler, RawProfiler,
RawOTable, RawOTable,
RawReduxDeprecated, RawReduxDeprecated,
@ -45,10 +42,8 @@ import type {
RawSetPageVisibility, RawSetPageVisibility,
RawLoadFontFace, RawLoadFontFace,
RawSetNodeFocus, RawSetNodeFocus,
RawLongTask,
RawSetNodeAttributeURLBased, RawSetNodeAttributeURLBased,
RawSetCssDataURLBased, RawSetCssDataURLBased,
RawCssInsertRuleURLBased,
RawMouseClick, RawMouseClick,
RawMouseClickDeprecated, RawMouseClickDeprecated,
RawCreateIFrameDocument, RawCreateIFrameDocument,
@ -129,12 +124,6 @@ export type StringDictGlobal = RawStringDictGlobal & Timed
export type SetNodeAttributeDictGlobal = RawSetNodeAttributeDictGlobal & 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 Profiler = RawProfiler & Timed
export type OTable = RawOTable & Timed export type OTable = RawOTable & Timed
@ -169,14 +158,10 @@ export type LoadFontFace = RawLoadFontFace & Timed
export type SetNodeFocus = RawSetNodeFocus & Timed export type SetNodeFocus = RawSetNodeFocus & Timed
export type LongTask = RawLongTask & Timed
export type SetNodeAttributeURLBased = RawSetNodeAttributeURLBased & Timed export type SetNodeAttributeURLBased = RawSetNodeAttributeURLBased & Timed
export type SetCssDataURLBased = RawSetCssDataURLBased & Timed export type SetCssDataURLBased = RawSetCssDataURLBased & Timed
export type CssInsertRuleURLBased = RawCssInsertRuleURLBased & Timed
export type MouseClick = RawMouseClick & Timed export type MouseClick = RawMouseClick & Timed
export type MouseClickDeprecated = RawMouseClickDeprecated & Timed export type MouseClickDeprecated = RawMouseClickDeprecated & Timed

View file

@ -23,9 +23,6 @@ export const enum MType {
ConsoleLog = 22, ConsoleLog = 22,
StringDictGlobal = 34, StringDictGlobal = 34,
SetNodeAttributeDictGlobal = 35, SetNodeAttributeDictGlobal = 35,
CssInsertRule = 37,
CssDeleteRule = 38,
Fetch = 39,
Profiler = 40, Profiler = 40,
OTable = 41, OTable = 41,
ReduxDeprecated = 44, ReduxDeprecated = 44,
@ -43,10 +40,8 @@ export const enum MType {
SetPageVisibility = 55, SetPageVisibility = 55,
LoadFontFace = 57, LoadFontFace = 57,
SetNodeFocus = 58, SetNodeFocus = 58,
LongTask = 59,
SetNodeAttributeURLBased = 60, SetNodeAttributeURLBased = 60,
SetCssDataURLBased = 61, SetCssDataURLBased = 61,
CssInsertRuleURLBased = 67,
MouseClick = 68, MouseClick = 68,
MouseClickDeprecated = 69, MouseClickDeprecated = 69,
CreateIFrameDocument = 70, CreateIFrameDocument = 70,
@ -222,30 +217,6 @@ export interface RawSetNodeAttributeDictGlobal {
value: number, 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 { export interface RawProfiler {
tp: MType.Profiler, tp: MType.Profiler,
name: string, name: string,
@ -365,17 +336,6 @@ export interface RawSetNodeFocus {
id: number, 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 { export interface RawSetNodeAttributeURLBased {
tp: MType.SetNodeAttributeURLBased, tp: MType.SetNodeAttributeURLBased,
id: number, id: number,
@ -391,14 +351,6 @@ export interface RawSetCssDataURLBased {
baseURL: string, baseURL: string,
} }
export interface RawCssInsertRuleURLBased {
tp: MType.CssInsertRuleURLBased,
id: number,
rule: string,
index: number,
baseURL: string,
}
export interface RawMouseClick { export interface RawMouseClick {
tp: MType.MouseClick, tp: MType.MouseClick,
id: number, 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;

View file

@ -24,9 +24,6 @@ export const TP_MAP = {
22: MType.ConsoleLog, 22: MType.ConsoleLog,
34: MType.StringDictGlobal, 34: MType.StringDictGlobal,
35: MType.SetNodeAttributeDictGlobal, 35: MType.SetNodeAttributeDictGlobal,
37: MType.CssInsertRule,
38: MType.CssDeleteRule,
39: MType.Fetch,
40: MType.Profiler, 40: MType.Profiler,
41: MType.OTable, 41: MType.OTable,
44: MType.ReduxDeprecated, 44: MType.ReduxDeprecated,
@ -44,10 +41,8 @@ export const TP_MAP = {
55: MType.SetPageVisibility, 55: MType.SetPageVisibility,
57: MType.LoadFontFace, 57: MType.LoadFontFace,
58: MType.SetNodeFocus, 58: MType.SetNodeFocus,
59: MType.LongTask,
60: MType.SetNodeAttributeURLBased, 60: MType.SetNodeAttributeURLBased,
61: MType.SetCssDataURLBased, 61: MType.SetCssDataURLBased,
67: MType.CssInsertRuleURLBased,
68: MType.MouseClick, 68: MType.MouseClick,
69: MType.MouseClickDeprecated, 69: MType.MouseClickDeprecated,
70: MType.CreateIFrameDocument, 70: MType.CreateIFrameDocument,

View file

@ -186,30 +186,6 @@ type TrSetNodeAttributeDictGlobal = [
value: number, 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 TrProfiler = [
type: 40, type: 40,
name: string, name: string,
@ -334,17 +310,6 @@ type TrSetNodeFocus = [
id: number, id: number,
] ]
type TrLongTask = [
type: 59,
timestamp: number,
duration: number,
context: number,
containerType: number,
containerSrc: string,
containerId: string,
containerName: string,
]
type TrSetNodeAttributeURLBased = [ type TrSetNodeAttributeURLBased = [
type: 60, type: 60,
id: number, id: number,
@ -372,14 +337,6 @@ type TrCustomIssue = [
payload: string, payload: string,
] ]
type TrCSSInsertRuleURLBased = [
type: 67,
id: number,
rule: string,
index: number,
baseURL: string,
]
type TrMouseClick = [ type TrMouseClick = [
type: 68, type: 68,
id: number, 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 { export default function translate(tMsg: TrackerMessage): RawMessage | null {
switch(tMsg[0]) { 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: { case 40: {
return { return {
tp: MType.Profiler, 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: { case 60: {
return { return {
tp: MType.SetNodeAttributeURLBased, 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: { case 68: {
return { return {
tp: MType.MouseClick, tp: MType.MouseClick,

View file

@ -22,11 +22,6 @@ message 1, 'SessionStart', :tracker => false, :replayer => false do
string 'UserID' string 'UserID'
end 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 # DEPRECATED since 14.0.0 -> goto 122
message 4, 'SetPageLocationDeprecated' do message 4, 'SetPageLocationDeprecated' do
string 'URL' string 'URL'
@ -134,12 +129,6 @@ message 24, 'PageRenderTiming', :replayer => false do
uint 'VisuallyComplete' uint 'VisuallyComplete'
uint 'TimeToInteractive' uint 'TimeToInteractive'
end 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 message 26, 'IntegrationEvent', :tracker => false, :replayer => false do
uint 'Timestamp' uint 'Timestamp'
string 'Source' string 'Source'
@ -219,29 +208,6 @@ message 35, 'SetNodeAttributeDictGlobal' do
uint 'Name' uint 'Name'
uint 'Value' uint 'Value'
end 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 message 40, 'Profiler', :replayer => :devtools do
string 'Name' string 'Name'
uint 'Duration' uint 'Duration'
@ -342,7 +308,6 @@ message 56, 'PerformanceTrackAggr', :tracker => false, :replayer => false do
uint 'AvgUsedJSHeapSize' uint 'AvgUsedJSHeapSize'
uint 'MaxUsedJSHeapSize' uint 'MaxUsedJSHeapSize'
end end
# Since 4.1.7 / 1.9.0 # Since 4.1.7 / 1.9.0
message 57, 'LoadFontFace' do message 57, 'LoadFontFace' do
uint 'ParentID' uint 'ParentID'
@ -354,17 +319,6 @@ end
message 58, 'SetNodeFocus' do message 58, 'SetNodeFocus' do
int 'ID' int 'ID'
end 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 message 60, 'SetNodeAttributeURLBased' do
uint 'ID' uint 'ID'
string 'Name' string 'Name'
@ -377,15 +331,6 @@ message 61, 'SetCSSDataURLBased' do
string 'Data' string 'Data'
string 'BaseURL' string 'BaseURL'
end 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 message 63, 'TechnicalInfo', :replayer => false do
string 'Type' string 'Type'
string 'Value' string 'Value'
@ -398,13 +343,6 @@ end
message 66, 'AssetCache', :replayer => false, :tracker => false do message 66, 'AssetCache', :replayer => false, :tracker => false do
string 'URL' string 'URL'
end end
message 67, 'CSSInsertRuleURLBased' do
uint 'ID'
string 'Rule'
uint 'Index'
string 'BaseURL'
end
message 68, 'MouseClick' do message 68, 'MouseClick' do
uint 'ID' uint 'ID'
uint 'HesitationTime' uint 'HesitationTime'
@ -413,7 +351,6 @@ message 68, 'MouseClick' do
uint 'NormalizedX' uint 'NormalizedX'
uint 'NormalizedY' uint 'NormalizedY'
end end
message 69, 'MouseClickDeprecated' do message 69, 'MouseClickDeprecated' do
uint 'ID' uint 'ID'
uint 'HesitationTime' uint 'HesitationTime'
@ -477,13 +414,6 @@ end
# Special one for Batch Metadata. Message id could define the version # 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 # since tracker 3.6.0 TODO: for webworker only
message 81, 'BatchMetadata', :replayer => false do message 81, 'BatchMetadata', :replayer => false do
uint 'Version' uint 'Version'

View file

@ -29,9 +29,6 @@ export declare const enum Type {
Metadata = 30, Metadata = 30,
StringDictGlobal = 34, StringDictGlobal = 34,
SetNodeAttributeDictGlobal = 35, SetNodeAttributeDictGlobal = 35,
CSSInsertRule = 37,
CSSDeleteRule = 38,
Fetch = 39,
Profiler = 40, Profiler = 40,
OTable = 41, OTable = 41,
StateAction = 42, StateAction = 42,
@ -50,12 +47,10 @@ export declare const enum Type {
SetPageVisibility = 55, SetPageVisibility = 55,
LoadFontFace = 57, LoadFontFace = 57,
SetNodeFocus = 58, SetNodeFocus = 58,
LongTask = 59,
SetNodeAttributeURLBased = 60, SetNodeAttributeURLBased = 60,
SetCSSDataURLBased = 61, SetCSSDataURLBased = 61,
TechnicalInfo = 63, TechnicalInfo = 63,
CustomIssue = 64, CustomIssue = 64,
CSSInsertRuleURLBased = 67,
MouseClick = 68, MouseClick = 68,
MouseClickDeprecated = 69, MouseClickDeprecated = 69,
CreateIFrameDocument = 70, CreateIFrameDocument = 70,
@ -267,30 +262,6 @@ export type SetNodeAttributeDictGlobal = [
/*value:*/ number, /*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 = [ export type Profiler = [
/*type:*/ Type.Profiler, /*type:*/ Type.Profiler,
/*name:*/ string, /*name:*/ string,
@ -415,17 +386,6 @@ export type SetNodeFocus = [
/*id:*/ number, /*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 = [ export type SetNodeAttributeURLBased = [
/*type:*/ Type.SetNodeAttributeURLBased, /*type:*/ Type.SetNodeAttributeURLBased,
/*id:*/ number, /*id:*/ number,
@ -453,14 +413,6 @@ export type CustomIssue = [
/*payload:*/ string, /*payload:*/ string,
] ]
export type CSSInsertRuleURLBased = [
/*type:*/ Type.CSSInsertRuleURLBased,
/*id:*/ number,
/*rule:*/ string,
/*index:*/ number,
/*baseURL:*/ string,
]
export type MouseClick = [ export type MouseClick = [
/*type:*/ Type.MouseClick, /*type:*/ Type.MouseClick,
/*id:*/ number, /*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 export default Message

View file

@ -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( export function Profiler(
name: string, name: string,
duration: number, 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( export function SetNodeAttributeURLBased(
id: number, id: number,
name: string, 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( export function MouseClick(
id: number, id: number,
hesitationTime: number, hesitationTime: number,

View file

@ -118,18 +118,6 @@ export default class MessageEncoder extends PrimitiveEncoder {
return this.uint(msg[1]) && this.uint(msg[2]) && this.uint(msg[3]) return this.uint(msg[1]) && this.uint(msg[2]) && this.uint(msg[3])
break 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: case Messages.Type.Profiler:
return this.string(msg[1]) && this.uint(msg[2]) && this.string(msg[3]) && this.string(msg[4]) return this.string(msg[1]) && this.uint(msg[2]) && this.string(msg[3]) && this.string(msg[4])
break break
@ -202,10 +190,6 @@ export default class MessageEncoder extends PrimitiveEncoder {
return this.int(msg[1]) return this.int(msg[1])
break 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: case Messages.Type.SetNodeAttributeURLBased:
return this.uint(msg[1]) && this.string(msg[2]) && this.string(msg[3]) && this.string(msg[4]) return this.uint(msg[1]) && this.string(msg[2]) && this.string(msg[3]) && this.string(msg[4])
break break
@ -222,10 +206,6 @@ export default class MessageEncoder extends PrimitiveEncoder {
return this.string(msg[1]) && this.string(msg[2]) return this.string(msg[1]) && this.string(msg[2])
break 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: 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]) 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 break