tracker, backend: fixup msg gen

This commit is contained in:
nick-delirium 2025-05-14 11:50:57 +02:00
parent c4ad390b3f
commit a4f6a93c59
No known key found for this signature in database
GPG key ID: 93ABD695DF5FDBA0
15 changed files with 610 additions and 209 deletions

View file

@ -2,124 +2,125 @@
package messages package messages
const ( const (
MsgTimestamp = 0 MsgTimestamp = 0
MsgSessionStart = 1 MsgSessionStart = 1
MsgSessionEndDeprecated = 3 MsgSessionEndDeprecated = 3
MsgSetPageLocationDeprecated = 4 MsgSetPageLocationDeprecated = 4
MsgSetViewportSize = 5 MsgSetViewportSize = 5
MsgSetViewportScroll = 6 MsgSetViewportScroll = 6
MsgCreateDocument = 7 MsgCreateDocument = 7
MsgCreateElementNode = 8 MsgCreateElementNode = 8
MsgCreateTextNode = 9 MsgCreateTextNode = 9
MsgMoveNode = 10 MsgMoveNode = 10
MsgRemoveNode = 11 MsgRemoveNode = 11
MsgSetNodeAttribute = 12 MsgSetNodeAttribute = 12
MsgRemoveNodeAttribute = 13 MsgRemoveNodeAttribute = 13
MsgSetNodeData = 14 MsgSetNodeData = 14
MsgSetCSSData = 15 MsgSetCSSData = 15
MsgSetNodeScroll = 16 MsgSetNodeScroll = 16
MsgSetInputTarget = 17 MsgSetInputTarget = 17
MsgSetInputValue = 18 MsgSetInputValue = 18
MsgSetInputChecked = 19 MsgSetInputChecked = 19
MsgMouseMove = 20 MsgMouseMove = 20
MsgNetworkRequestDeprecated = 21 MsgNetworkRequestDeprecated = 21
MsgConsoleLog = 22 MsgConsoleLog = 22
MsgPageLoadTiming = 23 MsgPageLoadTiming = 23
MsgPageRenderTiming = 24 MsgPageRenderTiming = 24
MsgJSExceptionDeprecated = 25 MsgJSExceptionDeprecated = 25
MsgIntegrationEvent = 26 MsgIntegrationEvent = 26
MsgCustomEvent = 27 MsgCustomEvent = 27
MsgUserID = 28 MsgUserID = 28
MsgUserAnonymousID = 29 MsgUserAnonymousID = 29
MsgMetadata = 30 MsgMetadata = 30
MsgPageEventDeprecated = 31 MsgPageEventDeprecated = 31
MsgInputEvent = 32 MsgInputEvent = 32
MsgPageEvent = 33 MsgPageEvent = 33
MsgStringDictGlobal = 34 MsgStringDictGlobal = 34
MsgSetNodeAttributeDictGlobal = 35 MsgSetNodeAttributeDictGlobal = 35
MsgCSSInsertRule = 37 MsgCSSInsertRule = 37
MsgCSSDeleteRule = 38 MsgCSSDeleteRule = 38
MsgFetch = 39 MsgFetch = 39
MsgProfiler = 40 MsgProfiler = 40
MsgOTable = 41 MsgOTable = 41
MsgStateAction = 42 MsgStateAction = 42
MsgReduxDeprecated = 44 MsgReduxDeprecated = 44
MsgVuex = 45 MsgVuex = 45
MsgMobX = 46 MsgMobX = 46
MsgNgRx = 47 MsgNgRx = 47
MsgGraphQLDeprecated = 48 MsgGraphQLDeprecated = 48
MsgPerformanceTrack = 49 MsgPerformanceTrack = 49
MsgStringDictDeprecated = 50 MsgStringDictDeprecated = 50
MsgSetNodeAttributeDictDeprecated = 51 MsgSetNodeAttributeDictDeprecated = 51
MsgStringDict = 43 MsgStringDict = 43
MsgSetNodeAttributeDict = 52 MsgSetNodeAttributeDict = 52
MsgResourceTimingDeprecated = 53 MsgResourceTimingDeprecatedDeprecated = 53
MsgConnectionInformation = 54 MsgConnectionInformation = 54
MsgSetPageVisibility = 55 MsgSetPageVisibility = 55
MsgPerformanceTrackAggr = 56 MsgPerformanceTrackAggr = 56
MsgLoadFontFace = 57 MsgLoadFontFace = 57
MsgSetNodeFocus = 58 MsgSetNodeFocus = 58
MsgLongTask = 59 MsgLongTask = 59
MsgSetNodeAttributeURLBased = 60 MsgSetNodeAttributeURLBased = 60
MsgSetCSSDataURLBased = 61 MsgSetCSSDataURLBased = 61
MsgIssueEventDeprecated = 62 MsgIssueEventDeprecated = 62
MsgTechnicalInfo = 63 MsgTechnicalInfo = 63
MsgCustomIssue = 64 MsgCustomIssue = 64
MsgAssetCache = 66 MsgAssetCache = 66
MsgCSSInsertRuleURLBased = 67 MsgCSSInsertRuleURLBased = 67
MsgMouseClick = 68 MsgMouseClick = 68
MsgMouseClickDeprecated = 69 MsgMouseClickDeprecated = 69
MsgCreateIFrameDocument = 70 MsgCreateIFrameDocument = 70
MsgAdoptedSSReplaceURLBased = 71 MsgAdoptedSSReplaceURLBased = 71
MsgAdoptedSSReplace = 72 MsgAdoptedSSReplace = 72
MsgAdoptedSSInsertRuleURLBased = 73 MsgAdoptedSSInsertRuleURLBased = 73
MsgAdoptedSSInsertRule = 74 MsgAdoptedSSInsertRule = 74
MsgAdoptedSSDeleteRule = 75 MsgAdoptedSSDeleteRule = 75
MsgAdoptedSSAddOwner = 76 MsgAdoptedSSAddOwner = 76
MsgAdoptedSSRemoveOwner = 77 MsgAdoptedSSRemoveOwner = 77
MsgJSException = 78 MsgJSException = 78
MsgZustand = 79 MsgZustand = 79
MsgBatchMeta = 80 MsgBatchMeta = 80
MsgBatchMetadata = 81 MsgBatchMetadata = 81
MsgPartitionedMessage = 82 MsgPartitionedMessage = 82
MsgNetworkRequest = 83 MsgNetworkRequest = 83
MsgWSChannel = 84 MsgWSChannel = 84
MsgLongAnimationTask = 89 MsgResourceTiming = 85
MsgInputChange = 112 MsgLongAnimationTask = 89
MsgSelectionChange = 113 MsgInputChange = 112
MsgMouseThrashing = 114 MsgSelectionChange = 113
MsgUnbindNodes = 115 MsgMouseThrashing = 114
MsgResourceTiming = 116 MsgUnbindNodes = 115
MsgTabChange = 117 MsgResourceTimingDeprecated = 116
MsgTabData = 118 MsgTabChange = 117
MsgCanvasNode = 119 MsgTabData = 118
MsgTagTrigger = 120 MsgCanvasNode = 119
MsgRedux = 121 MsgTagTrigger = 120
MsgSetPageLocation = 122 MsgRedux = 121
MsgGraphQL = 123 MsgSetPageLocation = 122
MsgWebVitals = 124 MsgGraphQL = 123
MsgIssueEvent = 125 MsgWebVitals = 124
MsgSessionEnd = 126 MsgIssueEvent = 125
MsgSessionSearch = 127 MsgSessionEnd = 126
MsgMobileSessionStart = 90 MsgSessionSearch = 127
MsgMobileSessionEnd = 91 MsgMobileSessionStart = 90
MsgMobileMetadata = 92 MsgMobileSessionEnd = 91
MsgMobileEvent = 93 MsgMobileMetadata = 92
MsgMobileUserID = 94 MsgMobileEvent = 93
MsgMobileUserAnonymousID = 95 MsgMobileUserID = 94
MsgMobileScreenChanges = 96 MsgMobileUserAnonymousID = 95
MsgMobileCrash = 97 MsgMobileScreenChanges = 96
MsgMobileViewComponentEvent = 98 MsgMobileCrash = 97
MsgMobileClickEvent = 100 MsgMobileViewComponentEvent = 98
MsgMobileInputEvent = 101 MsgMobileClickEvent = 100
MsgMobilePerformanceEvent = 102 MsgMobileInputEvent = 101
MsgMobileLog = 103 MsgMobilePerformanceEvent = 102
MsgMobileInternalError = 104 MsgMobileLog = 103
MsgMobileNetworkCall = 105 MsgMobileInternalError = 104
MsgMobileSwipeEvent = 106 MsgMobileNetworkCall = 105
MsgMobileBatchMeta = 107 MsgMobileSwipeEvent = 106
MsgMobilePerformanceAggregated = 110 MsgMobileBatchMeta = 107
MsgMobileIssueEvent = 111 MsgMobilePerformanceAggregated = 110
MsgMobileIssueEvent = 111
) )
type Timestamp struct { type Timestamp struct {
@ -2295,6 +2296,59 @@ func (msg *WSChannel) TypeID() int {
return 84 return 84
} }
type ResourceTiming struct {
message
Timestamp uint64
Duration uint64
TTFB uint64
HeaderSize uint64
EncodedBodySize uint64
DecodedBodySize uint64
URL string
Initiator string
TransferredSize uint64
Cached bool
Queueing uint64
DnsLookup uint64
InitialConnection uint64
SSL uint64
ContentDownload uint64
Total uint64
Stalled uint64
}
func (msg *ResourceTiming) Encode() []byte {
buf := make([]byte, 171+len(msg.URL)+len(msg.Initiator))
buf[0] = 85
p := 1
p = WriteUint(msg.Timestamp, buf, p)
p = WriteUint(msg.Duration, buf, p)
p = WriteUint(msg.TTFB, buf, p)
p = WriteUint(msg.HeaderSize, buf, p)
p = WriteUint(msg.EncodedBodySize, buf, p)
p = WriteUint(msg.DecodedBodySize, buf, p)
p = WriteString(msg.URL, buf, p)
p = WriteString(msg.Initiator, buf, p)
p = WriteUint(msg.TransferredSize, buf, p)
p = WriteBoolean(msg.Cached, buf, p)
p = WriteUint(msg.Queueing, buf, p)
p = WriteUint(msg.DnsLookup, buf, p)
p = WriteUint(msg.InitialConnection, buf, p)
p = WriteUint(msg.SSL, buf, p)
p = WriteUint(msg.ContentDownload, buf, p)
p = WriteUint(msg.Total, buf, p)
p = WriteUint(msg.Stalled, buf, p)
return buf[:p]
}
func (msg *ResourceTiming) Decode() Message {
return msg
}
func (msg *ResourceTiming) TypeID() int {
return 85
}
type LongAnimationTask struct { type LongAnimationTask struct {
message message
Name string Name string

View file

@ -1419,6 +1419,63 @@ func DecodeWSChannel(reader BytesReader) (Message, error) {
return msg, err return msg, err
} }
func DecodeResourceTiming(reader BytesReader) (Message, error) {
var err error = nil
msg := &ResourceTiming{}
if msg.Timestamp, err = reader.ReadUint(); err != nil {
return nil, err
}
if msg.Duration, err = reader.ReadUint(); err != nil {
return nil, err
}
if msg.TTFB, err = reader.ReadUint(); err != nil {
return nil, err
}
if msg.HeaderSize, err = reader.ReadUint(); err != nil {
return nil, err
}
if msg.EncodedBodySize, err = reader.ReadUint(); err != nil {
return nil, err
}
if msg.DecodedBodySize, err = reader.ReadUint(); err != nil {
return nil, err
}
if msg.URL, err = reader.ReadString(); err != nil {
return nil, err
}
if msg.Initiator, err = reader.ReadString(); err != nil {
return nil, err
}
if msg.TransferredSize, err = reader.ReadUint(); err != nil {
return nil, err
}
if msg.Cached, err = reader.ReadBoolean(); err != nil {
return nil, err
}
if msg.Queueing, err = reader.ReadUint(); err != nil {
return nil, err
}
if msg.DnsLookup, err = reader.ReadUint(); err != nil {
return nil, err
}
if msg.InitialConnection, err = reader.ReadUint(); err != nil {
return nil, err
}
if msg.SSL, err = reader.ReadUint(); err != nil {
return nil, err
}
if msg.ContentDownload, err = reader.ReadUint(); err != nil {
return nil, err
}
if msg.Total, err = reader.ReadUint(); err != nil {
return nil, err
}
if msg.Stalled, err = reader.ReadUint(); err != nil {
return nil, err
}
return msg, err
}
func DecodeLongAnimationTask(reader BytesReader) (Message, error) { func DecodeLongAnimationTask(reader BytesReader) (Message, error) {
var err error = nil var err error = nil
msg := &LongAnimationTask{} msg := &LongAnimationTask{}
@ -1440,9 +1497,6 @@ func DecodeLongAnimationTask(reader BytesReader) (Message, error) {
if msg.Scripts, err = reader.ReadString(); err != nil { if msg.Scripts, err = reader.ReadString(); err != nil {
return nil, err return nil, err
} }
if msg.Stalled, err = reader.ReadUint(); err != nil {
return nil, err
}
return msg, err return msg, err
} }
@ -2275,6 +2329,8 @@ func ReadMessage(t uint64, reader BytesReader) (Message, error) {
return DecodeNetworkRequest(reader) return DecodeNetworkRequest(reader)
case 84: case 84:
return DecodeWSChannel(reader) return DecodeWSChannel(reader)
case 85:
return DecodeResourceTiming(reader)
case 89: case 89:
return DecodeLongAnimationTask(reader) return DecodeLongAnimationTask(reader)
case 112: case 112:

View file

@ -71,7 +71,7 @@ class CreateDocument(Message):
__id__ = 7 __id__ = 7
def __init__(self, ): def __init__(self, ):
class CreateElementNode(Message): class CreateElementNode(Message):
@ -806,6 +806,29 @@ class WSChannel(Message):
self.message_type = message_type self.message_type = message_type
class ResourceTiming(Message):
__id__ = 85
def __init__(self, timestamp, duration, ttfb, header_size, encoded_body_size, decoded_body_size, url, initiator, transferred_size, cached, queueing, dns_lookup, initial_connection, ssl, content_download, total, stalled):
self.timestamp = timestamp
self.duration = duration
self.ttfb = ttfb
self.header_size = header_size
self.encoded_body_size = encoded_body_size
self.decoded_body_size = decoded_body_size
self.url = url
self.initiator = initiator
self.transferred_size = transferred_size
self.cached = cached
self.queueing = queueing
self.dns_lookup = dns_lookup
self.initial_connection = initial_connection
self.ssl = ssl
self.content_download = content_download
self.total = total
self.stalled = stalled
class LongAnimationTask(Message): class LongAnimationTask(Message):
__id__ = 89 __id__ = 89
@ -1177,3 +1200,5 @@ class MobileIssueEvent(Message):
self.context_string = context_string self.context_string = context_string
self.context = context self.context = context
self.payload = payload self.payload = payload

View file

@ -104,11 +104,11 @@ cdef class SetViewportScroll(PyMessage):
cdef class CreateDocument(PyMessage): cdef class CreateDocument(PyMessage):
cdef public int __id__ cdef public int __id__
def __init__(self, ): def __init__(self, ):
self.__id__ = 7 self.__id__ = 7
cdef class CreateElementNode(PyMessage): cdef class CreateElementNode(PyMessage):
@ -1200,6 +1200,47 @@ cdef class WSChannel(PyMessage):
self.message_type = message_type self.message_type = message_type
cdef class ResourceTiming(PyMessage):
cdef public int __id__
cdef public unsigned long timestamp
cdef public unsigned long duration
cdef public unsigned long ttfb
cdef public unsigned long header_size
cdef public unsigned long encoded_body_size
cdef public unsigned long decoded_body_size
cdef public str url
cdef public str initiator
cdef public unsigned long transferred_size
cdef public bint cached
cdef public unsigned long queueing
cdef public unsigned long dns_lookup
cdef public unsigned long initial_connection
cdef public unsigned long ssl
cdef public unsigned long content_download
cdef public unsigned long total
cdef public unsigned long stalled
def __init__(self, unsigned long timestamp, unsigned long duration, unsigned long ttfb, unsigned long header_size, unsigned long encoded_body_size, unsigned long decoded_body_size, str url, str initiator, unsigned long transferred_size, bint cached, unsigned long queueing, unsigned long dns_lookup, unsigned long initial_connection, unsigned long ssl, unsigned long content_download, unsigned long total, unsigned long stalled):
self.__id__ = 85
self.timestamp = timestamp
self.duration = duration
self.ttfb = ttfb
self.header_size = header_size
self.encoded_body_size = encoded_body_size
self.decoded_body_size = decoded_body_size
self.url = url
self.initiator = initiator
self.transferred_size = transferred_size
self.cached = cached
self.queueing = queueing
self.dns_lookup = dns_lookup
self.initial_connection = initial_connection
self.ssl = ssl
self.content_download = content_download
self.total = total
self.stalled = stalled
cdef class LongAnimationTask(PyMessage): cdef class LongAnimationTask(PyMessage):
cdef public int __id__ cdef public int __id__
cdef public str name cdef public str name
@ -1764,3 +1805,5 @@ cdef class MobileIssueEvent(PyMessage):
self.context_string = context_string self.context_string = context_string
self.context = context self.context = context
self.payload = payload self.payload = payload

View file

@ -144,7 +144,7 @@ class MessageCodec(Codec):
if message_id == 7: if message_id == 7:
return CreateDocument( return CreateDocument(
) )
if message_id == 8: if message_id == 8:
@ -729,6 +729,27 @@ class MessageCodec(Codec):
message_type=self.read_string(reader) message_type=self.read_string(reader)
) )
if message_id == 85:
return ResourceTiming(
timestamp=self.read_uint(reader),
duration=self.read_uint(reader),
ttfb=self.read_uint(reader),
header_size=self.read_uint(reader),
encoded_body_size=self.read_uint(reader),
decoded_body_size=self.read_uint(reader),
url=self.read_string(reader),
initiator=self.read_string(reader),
transferred_size=self.read_uint(reader),
cached=self.read_boolean(reader),
queueing=self.read_uint(reader),
dns_lookup=self.read_uint(reader),
initial_connection=self.read_uint(reader),
ssl=self.read_uint(reader),
content_download=self.read_uint(reader),
total=self.read_uint(reader),
stalled=self.read_uint(reader)
)
if message_id == 89: if message_id == 89:
return LongAnimationTask( return LongAnimationTask(
name=self.read_string(reader), name=self.read_string(reader),
@ -1029,3 +1050,4 @@ class MessageCodec(Codec):
context=self.read_string(reader), context=self.read_string(reader),
payload=self.read_string(reader) payload=self.read_string(reader)
) )

View file

@ -242,7 +242,7 @@ cdef class MessageCodec:
if message_id == 7: if message_id == 7:
return CreateDocument( return CreateDocument(
) )
if message_id == 8: if message_id == 8:
@ -827,6 +827,27 @@ cdef class MessageCodec:
message_type=self.read_string(reader) message_type=self.read_string(reader)
) )
if message_id == 85:
return ResourceTiming(
timestamp=self.read_uint(reader),
duration=self.read_uint(reader),
ttfb=self.read_uint(reader),
header_size=self.read_uint(reader),
encoded_body_size=self.read_uint(reader),
decoded_body_size=self.read_uint(reader),
url=self.read_string(reader),
initiator=self.read_string(reader),
transferred_size=self.read_uint(reader),
cached=self.read_boolean(reader),
queueing=self.read_uint(reader),
dns_lookup=self.read_uint(reader),
initial_connection=self.read_uint(reader),
ssl=self.read_uint(reader),
content_download=self.read_uint(reader),
total=self.read_uint(reader),
stalled=self.read_uint(reader)
)
if message_id == 89: if message_id == 89:
return LongAnimationTask( return LongAnimationTask(
name=self.read_string(reader), name=self.read_string(reader),
@ -1127,3 +1148,4 @@ cdef class MessageCodec:
context=self.read_string(reader), context=self.read_string(reader),
payload=self.read_string(reader) payload=self.read_string(reader)
) )

View file

@ -733,6 +733,46 @@ export default class RawMessageReader extends PrimitiveReader {
}; };
} }
case 85: {
const timestamp = this.readUint(); if (timestamp === null) { return resetPointer() }
const duration = this.readUint(); if (duration === null) { return resetPointer() }
const ttfb = this.readUint(); if (ttfb === null) { return resetPointer() }
const headerSize = this.readUint(); if (headerSize === null) { return resetPointer() }
const encodedBodySize = this.readUint(); if (encodedBodySize === null) { return resetPointer() }
const decodedBodySize = this.readUint(); if (decodedBodySize === null) { return resetPointer() }
const url = this.readString(); if (url === null) { return resetPointer() }
const initiator = this.readString(); if (initiator === null) { return resetPointer() }
const transferredSize = this.readUint(); if (transferredSize === null) { return resetPointer() }
const cached = this.readBoolean(); if (cached === null) { return resetPointer() }
const queueing = this.readUint(); if (queueing === null) { return resetPointer() }
const dnsLookup = this.readUint(); if (dnsLookup === null) { return resetPointer() }
const initialConnection = this.readUint(); if (initialConnection === null) { return resetPointer() }
const ssl = this.readUint(); if (ssl === null) { return resetPointer() }
const contentDownload = this.readUint(); if (contentDownload === null) { return resetPointer() }
const total = this.readUint(); if (total === null) { return resetPointer() }
const stalled = this.readUint(); if (stalled === null) { return resetPointer() }
return {
tp: MType.ResourceTiming,
timestamp,
duration,
ttfb,
headerSize,
encodedBodySize,
decodedBodySize,
url,
initiator,
transferredSize,
cached,
queueing,
dnsLookup,
initialConnection,
ssl,
contentDownload,
total,
stalled,
};
}
case 89: { case 89: {
const name = this.readString(); if (name === null) { return resetPointer() } const name = this.readString(); if (name === null) { return resetPointer() }
const duration = this.readInt(); if (duration === null) { return resetPointer() } const duration = this.readInt(); if (duration === null) { return resetPointer() }

View file

@ -7,4 +7,4 @@ const IOS_TYPES = [90,91,92,93,94,95,96,97,98,100,101,102,103,104,105,106,107,11
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,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]
export function isDOMType(t: MType) { export function isDOMType(t: MType) {
return DOM_TYPES.includes(t) return DOM_TYPES.includes(t)
} }

View file

@ -62,6 +62,7 @@ import type {
RawZustand, RawZustand,
RawNetworkRequest, RawNetworkRequest,
RawWsChannel, RawWsChannel,
RawResourceTiming,
RawLongAnimationTask, RawLongAnimationTask,
RawSelectionChange, RawSelectionChange,
RawMouseThrashing, RawMouseThrashing,
@ -160,7 +161,7 @@ export type StringDict = RawStringDict & Timed
export type SetNodeAttributeDict = RawSetNodeAttributeDict & Timed export type SetNodeAttributeDict = RawSetNodeAttributeDict & Timed
export type ResourceTimingDeprecated = RawResourceTimingDeprecated & Timed export type ResourceTimingDeprecatedDeprecated = RawResourceTimingDeprecatedDeprecated & Timed
export type ConnectionInformation = RawConnectionInformation & Timed export type ConnectionInformation = RawConnectionInformation & Timed
@ -204,13 +205,15 @@ export type NetworkRequest = RawNetworkRequest & Timed
export type WsChannel = RawWsChannel & Timed export type WsChannel = RawWsChannel & Timed
export type ResourceTiming = RawResourceTiming & Timed
export type LongAnimationTask = RawLongAnimationTask & Timed export type LongAnimationTask = RawLongAnimationTask & Timed
export type SelectionChange = RawSelectionChange & Timed export type SelectionChange = RawSelectionChange & Timed
export type MouseThrashing = RawMouseThrashing & Timed export type MouseThrashing = RawMouseThrashing & Timed
export type ResourceTiming = RawResourceTiming & Timed export type ResourceTimingDeprecated = RawResourceTimingDeprecated & Timed
export type TabChange = RawTabChange & Timed export type TabChange = RawTabChange & Timed
@ -245,3 +248,4 @@ export type MobileNetworkCall = RawMobileNetworkCall & Timed
export type MobileSwipeEvent = RawMobileSwipeEvent & Timed export type MobileSwipeEvent = RawMobileSwipeEvent & Timed
export type MobileIssueEvent = RawMobileIssueEvent & Timed export type MobileIssueEvent = RawMobileIssueEvent & Timed

View file

@ -60,6 +60,7 @@ export const enum MType {
Zustand = 79, Zustand = 79,
NetworkRequest = 83, NetworkRequest = 83,
WsChannel = 84, WsChannel = 84,
ResourceTiming = 85,
LongAnimationTask = 89, LongAnimationTask = 89,
SelectionChange = 113, SelectionChange = 113,
MouseThrashing = 114, MouseThrashing = 114,
@ -330,8 +331,8 @@ export interface RawSetNodeAttributeDict {
value: string, value: string,
} }
export interface RawResourceTimingDeprecated { export interface RawResourceTimingDeprecatedDeprecated {
tp: MType.ResourceTimingDeprecated, tp: MType.ResourceTimingDeprecatedDeprecated,
timestamp: number, timestamp: number,
duration: number, duration: number,
ttfb: number, ttfb: number,
@ -499,6 +500,27 @@ export interface RawWsChannel {
messageType: string, messageType: string,
} }
export interface RawResourceTiming {
tp: MType.ResourceTiming,
timestamp: number,
duration: number,
ttfb: number,
headerSize: number,
encodedBodySize: number,
decodedBodySize: number,
url: string,
initiator: string,
transferredSize: number,
cached: boolean,
queueing: number,
dnsLookup: number,
initialConnection: number,
ssl: number,
contentDownload: number,
total: number,
stalled: number,
}
export interface RawLongAnimationTask { export interface RawLongAnimationTask {
tp: MType.LongAnimationTask, tp: MType.LongAnimationTask,
name: string, name: string,
@ -521,8 +543,8 @@ export interface RawMouseThrashing {
timestamp: number, timestamp: number,
} }
export interface RawResourceTiming { export interface RawResourceTimingDeprecated {
tp: MType.ResourceTiming, tp: MType.ResourceTimingDeprecated,
timestamp: number, timestamp: number,
duration: number, duration: number,
ttfb: number, ttfb: number,
@ -673,4 +695,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 | RawLongAnimationTask | 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 | RawCssInsertRule | RawCssDeleteRule | RawFetch | RawProfiler | RawOTable | RawReduxDeprecated | RawVuex | RawMobX | RawNgRx | RawGraphQlDeprecated | RawPerformanceTrack | RawStringDictDeprecated | RawSetNodeAttributeDictDeprecated | RawStringDict | RawSetNodeAttributeDict | RawResourceTimingDeprecatedDeprecated | RawConnectionInformation | RawSetPageVisibility | RawLoadFontFace | RawSetNodeFocus | RawLongTask | RawSetNodeAttributeURLBased | RawSetCssDataURLBased | RawCssInsertRuleURLBased | RawMouseClick | RawMouseClickDeprecated | RawCreateIFrameDocument | RawAdoptedSsReplaceURLBased | RawAdoptedSsReplace | RawAdoptedSsInsertRuleURLBased | RawAdoptedSsInsertRule | RawAdoptedSsDeleteRule | RawAdoptedSsAddOwner | RawAdoptedSsRemoveOwner | RawZustand | RawNetworkRequest | RawWsChannel | RawResourceTiming | RawLongAnimationTask | RawSelectionChange | RawMouseThrashing | RawResourceTimingDeprecated | RawTabChange | RawTabData | RawCanvasNode | RawTagTrigger | RawRedux | RawSetPageLocation | RawGraphQl | RawMobileEvent | RawMobileScreenChanges | RawMobileClickEvent | RawMobileInputEvent | RawMobilePerformanceEvent | RawMobileLog | RawMobileInternalError | RawMobileNetworkCall | RawMobileSwipeEvent | RawMobileIssueEvent;

View file

@ -61,6 +61,7 @@ export const TP_MAP = {
79: MType.Zustand, 79: MType.Zustand,
83: MType.NetworkRequest, 83: MType.NetworkRequest,
84: MType.WsChannel, 84: MType.WsChannel,
85: MType.ResourceTiming,
89: MType.LongAnimationTask, 89: MType.LongAnimationTask,
113: MType.SelectionChange, 113: MType.SelectionChange,
114: MType.MouseThrashing, 114: MType.MouseThrashing,

View file

@ -31,7 +31,7 @@ type TrSetViewportScroll = [
type TrCreateDocument = [ type TrCreateDocument = [
type: 7, type: 7,
] ]
type TrCreateElementNode = [ type TrCreateElementNode = [
@ -489,6 +489,27 @@ type TrWSChannel = [
messageType: string, messageType: string,
] ]
type TrResourceTiming = [
type: 85,
timestamp: number,
duration: number,
ttfb: number,
headerSize: number,
encodedBodySize: number,
decodedBodySize: number,
url: string,
initiator: string,
transferredSize: number,
cached: boolean,
queueing: number,
dnsLookup: number,
initialConnection: number,
ssl: number,
contentDownload: number,
total: number,
stalled: number,
]
type TrLongAnimationTask = [ type TrLongAnimationTask = [
type: 89, type: 89,
name: string, name: string,
@ -593,18 +614,18 @@ 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 | TrLongAnimationTask | 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 | TrCSSInsertRule | TrCSSDeleteRule | TrFetch | TrProfiler | TrOTable | TrStateAction | TrReduxDeprecated | TrVuex | TrMobX | TrNgRx | TrGraphQLDeprecated | TrPerformanceTrack | TrStringDictDeprecated | TrSetNodeAttributeDictDeprecated | TrStringDict | TrSetNodeAttributeDict | TrResourceTimingDeprecatedDeprecated | TrConnectionInformation | TrSetPageVisibility | TrLoadFontFace | TrSetNodeFocus | TrLongTask | TrSetNodeAttributeURLBased | TrSetCSSDataURLBased | TrTechnicalInfo | TrCustomIssue | TrCSSInsertRuleURLBased | TrMouseClick | TrMouseClickDeprecated | TrCreateIFrameDocument | TrAdoptedSSReplaceURLBased | TrAdoptedSSInsertRuleURLBased | TrAdoptedSSDeleteRule | TrAdoptedSSAddOwner | TrAdoptedSSRemoveOwner | TrJSException | TrZustand | TrBatchMetadata | TrPartitionedMessage | TrNetworkRequest | TrWSChannel | TrResourceTiming | TrLongAnimationTask | TrInputChange | TrSelectionChange | TrMouseThrashing | TrUnbindNodes | TrResourceTimingDeprecated | 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]) {
case 0: { case 0: {
return { return {
tp: MType.Timestamp, tp: MType.Timestamp,
timestamp: tMsg[1], timestamp: tMsg[1],
} }
} }
case 4: { case 4: {
return { return {
tp: MType.SetPageLocationDeprecated, tp: MType.SetPageLocationDeprecated,
@ -613,7 +634,7 @@ export default function translate(tMsg: TrackerMessage): RawMessage | null {
navigationStart: tMsg[3], navigationStart: tMsg[3],
} }
} }
case 5: { case 5: {
return { return {
tp: MType.SetViewportSize, tp: MType.SetViewportSize,
@ -621,7 +642,7 @@ export default function translate(tMsg: TrackerMessage): RawMessage | null {
height: tMsg[2], height: tMsg[2],
} }
} }
case 6: { case 6: {
return { return {
tp: MType.SetViewportScroll, tp: MType.SetViewportScroll,
@ -629,14 +650,14 @@ export default function translate(tMsg: TrackerMessage): RawMessage | null {
y: tMsg[2], y: tMsg[2],
} }
} }
case 7: { case 7: {
return { return {
tp: MType.CreateDocument, tp: MType.CreateDocument,
} }
} }
case 8: { case 8: {
return { return {
tp: MType.CreateElementNode, tp: MType.CreateElementNode,
@ -647,7 +668,7 @@ export default function translate(tMsg: TrackerMessage): RawMessage | null {
svg: tMsg[5], svg: tMsg[5],
} }
} }
case 9: { case 9: {
return { return {
tp: MType.CreateTextNode, tp: MType.CreateTextNode,
@ -656,7 +677,7 @@ export default function translate(tMsg: TrackerMessage): RawMessage | null {
index: tMsg[3], index: tMsg[3],
} }
} }
case 10: { case 10: {
return { return {
tp: MType.MoveNode, tp: MType.MoveNode,
@ -665,14 +686,14 @@ export default function translate(tMsg: TrackerMessage): RawMessage | null {
index: tMsg[3], index: tMsg[3],
} }
} }
case 11: { case 11: {
return { return {
tp: MType.RemoveNode, tp: MType.RemoveNode,
id: tMsg[1], id: tMsg[1],
} }
} }
case 12: { case 12: {
return { return {
tp: MType.SetNodeAttribute, tp: MType.SetNodeAttribute,
@ -681,7 +702,7 @@ export default function translate(tMsg: TrackerMessage): RawMessage | null {
value: tMsg[3], value: tMsg[3],
} }
} }
case 13: { case 13: {
return { return {
tp: MType.RemoveNodeAttribute, tp: MType.RemoveNodeAttribute,
@ -689,7 +710,7 @@ export default function translate(tMsg: TrackerMessage): RawMessage | null {
name: tMsg[2], name: tMsg[2],
} }
} }
case 14: { case 14: {
return { return {
tp: MType.SetNodeData, tp: MType.SetNodeData,
@ -697,7 +718,7 @@ export default function translate(tMsg: TrackerMessage): RawMessage | null {
data: tMsg[2], data: tMsg[2],
} }
} }
case 16: { case 16: {
return { return {
tp: MType.SetNodeScroll, tp: MType.SetNodeScroll,
@ -706,7 +727,7 @@ export default function translate(tMsg: TrackerMessage): RawMessage | null {
y: tMsg[3], y: tMsg[3],
} }
} }
case 18: { case 18: {
return { return {
tp: MType.SetInputValue, tp: MType.SetInputValue,
@ -715,7 +736,7 @@ export default function translate(tMsg: TrackerMessage): RawMessage | null {
mask: tMsg[3], mask: tMsg[3],
} }
} }
case 19: { case 19: {
return { return {
tp: MType.SetInputChecked, tp: MType.SetInputChecked,
@ -723,7 +744,7 @@ export default function translate(tMsg: TrackerMessage): RawMessage | null {
checked: tMsg[2], checked: tMsg[2],
} }
} }
case 20: { case 20: {
return { return {
tp: MType.MouseMove, tp: MType.MouseMove,
@ -731,7 +752,7 @@ export default function translate(tMsg: TrackerMessage): RawMessage | null {
y: tMsg[2], y: tMsg[2],
} }
} }
case 21: { case 21: {
return { return {
tp: MType.NetworkRequestDeprecated, tp: MType.NetworkRequestDeprecated,
@ -745,7 +766,7 @@ export default function translate(tMsg: TrackerMessage): RawMessage | null {
duration: tMsg[8], duration: tMsg[8],
} }
} }
case 22: { case 22: {
return { return {
tp: MType.ConsoleLog, tp: MType.ConsoleLog,
@ -753,7 +774,7 @@ export default function translate(tMsg: TrackerMessage): RawMessage | null {
value: tMsg[2], value: tMsg[2],
} }
} }
case 34: { case 34: {
return { return {
tp: MType.StringDictGlobal, tp: MType.StringDictGlobal,
@ -761,7 +782,7 @@ export default function translate(tMsg: TrackerMessage): RawMessage | null {
value: tMsg[2], value: tMsg[2],
} }
} }
case 35: { case 35: {
return { return {
tp: MType.SetNodeAttributeDictGlobal, tp: MType.SetNodeAttributeDictGlobal,
@ -770,7 +791,7 @@ export default function translate(tMsg: TrackerMessage): RawMessage | null {
value: tMsg[3], value: tMsg[3],
} }
} }
case 37: { case 37: {
return { return {
tp: MType.CssInsertRule, tp: MType.CssInsertRule,
@ -779,7 +800,7 @@ export default function translate(tMsg: TrackerMessage): RawMessage | null {
index: tMsg[3], index: tMsg[3],
} }
} }
case 38: { case 38: {
return { return {
tp: MType.CssDeleteRule, tp: MType.CssDeleteRule,
@ -787,7 +808,7 @@ export default function translate(tMsg: TrackerMessage): RawMessage | null {
index: tMsg[2], index: tMsg[2],
} }
} }
case 39: { case 39: {
return { return {
tp: MType.Fetch, tp: MType.Fetch,
@ -800,7 +821,7 @@ export default function translate(tMsg: TrackerMessage): RawMessage | null {
duration: tMsg[7], duration: tMsg[7],
} }
} }
case 40: { case 40: {
return { return {
tp: MType.Profiler, tp: MType.Profiler,
@ -810,7 +831,7 @@ export default function translate(tMsg: TrackerMessage): RawMessage | null {
result: tMsg[4], result: tMsg[4],
} }
} }
case 41: { case 41: {
return { return {
tp: MType.OTable, tp: MType.OTable,
@ -818,7 +839,7 @@ export default function translate(tMsg: TrackerMessage): RawMessage | null {
value: tMsg[2], value: tMsg[2],
} }
} }
case 44: { case 44: {
return { return {
tp: MType.ReduxDeprecated, tp: MType.ReduxDeprecated,
@ -827,7 +848,7 @@ export default function translate(tMsg: TrackerMessage): RawMessage | null {
duration: tMsg[3], duration: tMsg[3],
} }
} }
case 45: { case 45: {
return { return {
tp: MType.Vuex, tp: MType.Vuex,
@ -835,7 +856,7 @@ export default function translate(tMsg: TrackerMessage): RawMessage | null {
state: tMsg[2], state: tMsg[2],
} }
} }
case 46: { case 46: {
return { return {
tp: MType.MobX, tp: MType.MobX,
@ -843,7 +864,7 @@ export default function translate(tMsg: TrackerMessage): RawMessage | null {
payload: tMsg[2], payload: tMsg[2],
} }
} }
case 47: { case 47: {
return { return {
tp: MType.NgRx, tp: MType.NgRx,
@ -852,7 +873,7 @@ export default function translate(tMsg: TrackerMessage): RawMessage | null {
duration: tMsg[3], duration: tMsg[3],
} }
} }
case 48: { case 48: {
return { return {
tp: MType.GraphQlDeprecated, tp: MType.GraphQlDeprecated,
@ -863,7 +884,7 @@ export default function translate(tMsg: TrackerMessage): RawMessage | null {
duration: tMsg[5], duration: tMsg[5],
} }
} }
case 49: { case 49: {
return { return {
tp: MType.PerformanceTrack, tp: MType.PerformanceTrack,
@ -873,7 +894,7 @@ export default function translate(tMsg: TrackerMessage): RawMessage | null {
usedJSHeapSize: tMsg[4], usedJSHeapSize: tMsg[4],
} }
} }
case 50: { case 50: {
return { return {
tp: MType.StringDictDeprecated, tp: MType.StringDictDeprecated,
@ -881,7 +902,7 @@ export default function translate(tMsg: TrackerMessage): RawMessage | null {
value: tMsg[2], value: tMsg[2],
} }
} }
case 51: { case 51: {
return { return {
tp: MType.SetNodeAttributeDictDeprecated, tp: MType.SetNodeAttributeDictDeprecated,
@ -890,7 +911,7 @@ export default function translate(tMsg: TrackerMessage): RawMessage | null {
valueKey: tMsg[3], valueKey: tMsg[3],
} }
} }
case 43: { case 43: {
return { return {
tp: MType.StringDict, tp: MType.StringDict,
@ -898,7 +919,7 @@ export default function translate(tMsg: TrackerMessage): RawMessage | null {
value: tMsg[2], value: tMsg[2],
} }
} }
case 52: { case 52: {
return { return {
tp: MType.SetNodeAttributeDict, tp: MType.SetNodeAttributeDict,
@ -907,7 +928,7 @@ export default function translate(tMsg: TrackerMessage): RawMessage | null {
value: tMsg[3], value: tMsg[3],
} }
} }
case 53: { case 53: {
return { return {
tp: MType.ResourceTimingDeprecatedDeprecated, tp: MType.ResourceTimingDeprecatedDeprecated,
@ -921,7 +942,7 @@ export default function translate(tMsg: TrackerMessage): RawMessage | null {
initiator: tMsg[8], initiator: tMsg[8],
} }
} }
case 54: { case 54: {
return { return {
tp: MType.ConnectionInformation, tp: MType.ConnectionInformation,
@ -929,14 +950,14 @@ export default function translate(tMsg: TrackerMessage): RawMessage | null {
type: tMsg[2], type: tMsg[2],
} }
} }
case 55: { case 55: {
return { return {
tp: MType.SetPageVisibility, tp: MType.SetPageVisibility,
hidden: tMsg[1], hidden: tMsg[1],
} }
} }
case 57: { case 57: {
return { return {
tp: MType.LoadFontFace, tp: MType.LoadFontFace,
@ -946,14 +967,14 @@ export default function translate(tMsg: TrackerMessage): RawMessage | null {
descriptors: tMsg[4], descriptors: tMsg[4],
} }
} }
case 58: { case 58: {
return { return {
tp: MType.SetNodeFocus, tp: MType.SetNodeFocus,
id: tMsg[1], id: tMsg[1],
} }
} }
case 59: { case 59: {
return { return {
tp: MType.LongTask, tp: MType.LongTask,
@ -966,7 +987,7 @@ export default function translate(tMsg: TrackerMessage): RawMessage | null {
containerName: tMsg[7], containerName: tMsg[7],
} }
} }
case 60: { case 60: {
return { return {
tp: MType.SetNodeAttributeURLBased, tp: MType.SetNodeAttributeURLBased,
@ -976,7 +997,7 @@ export default function translate(tMsg: TrackerMessage): RawMessage | null {
baseURL: tMsg[4], baseURL: tMsg[4],
} }
} }
case 61: { case 61: {
return { return {
tp: MType.SetCssDataURLBased, tp: MType.SetCssDataURLBased,
@ -985,7 +1006,7 @@ export default function translate(tMsg: TrackerMessage): RawMessage | null {
baseURL: tMsg[3], baseURL: tMsg[3],
} }
} }
case 67: { case 67: {
return { return {
tp: MType.CssInsertRuleURLBased, tp: MType.CssInsertRuleURLBased,
@ -995,7 +1016,7 @@ export default function translate(tMsg: TrackerMessage): RawMessage | null {
baseURL: tMsg[4], baseURL: tMsg[4],
} }
} }
case 68: { case 68: {
return { return {
tp: MType.MouseClick, tp: MType.MouseClick,
@ -1007,7 +1028,7 @@ export default function translate(tMsg: TrackerMessage): RawMessage | null {
normalizedY: tMsg[6], normalizedY: tMsg[6],
} }
} }
case 69: { case 69: {
return { return {
tp: MType.MouseClickDeprecated, tp: MType.MouseClickDeprecated,
@ -1017,7 +1038,7 @@ export default function translate(tMsg: TrackerMessage): RawMessage | null {
selector: tMsg[4], selector: tMsg[4],
} }
} }
case 70: { case 70: {
return { return {
tp: MType.CreateIFrameDocument, tp: MType.CreateIFrameDocument,
@ -1025,7 +1046,7 @@ export default function translate(tMsg: TrackerMessage): RawMessage | null {
id: tMsg[2], id: tMsg[2],
} }
} }
case 71: { case 71: {
return { return {
tp: MType.AdoptedSsReplaceURLBased, tp: MType.AdoptedSsReplaceURLBased,
@ -1034,7 +1055,7 @@ export default function translate(tMsg: TrackerMessage): RawMessage | null {
baseURL: tMsg[3], baseURL: tMsg[3],
} }
} }
case 73: { case 73: {
return { return {
tp: MType.AdoptedSsInsertRuleURLBased, tp: MType.AdoptedSsInsertRuleURLBased,
@ -1044,7 +1065,7 @@ export default function translate(tMsg: TrackerMessage): RawMessage | null {
baseURL: tMsg[4], baseURL: tMsg[4],
} }
} }
case 75: { case 75: {
return { return {
tp: MType.AdoptedSsDeleteRule, tp: MType.AdoptedSsDeleteRule,
@ -1052,7 +1073,7 @@ export default function translate(tMsg: TrackerMessage): RawMessage | null {
index: tMsg[2], index: tMsg[2],
} }
} }
case 76: { case 76: {
return { return {
tp: MType.AdoptedSsAddOwner, tp: MType.AdoptedSsAddOwner,
@ -1060,7 +1081,7 @@ export default function translate(tMsg: TrackerMessage): RawMessage | null {
id: tMsg[2], id: tMsg[2],
} }
} }
case 77: { case 77: {
return { return {
tp: MType.AdoptedSsRemoveOwner, tp: MType.AdoptedSsRemoveOwner,
@ -1068,7 +1089,7 @@ export default function translate(tMsg: TrackerMessage): RawMessage | null {
id: tMsg[2], id: tMsg[2],
} }
} }
case 79: { case 79: {
return { return {
tp: MType.Zustand, tp: MType.Zustand,
@ -1076,7 +1097,7 @@ export default function translate(tMsg: TrackerMessage): RawMessage | null {
state: tMsg[2], state: tMsg[2],
} }
} }
case 83: { case 83: {
return { return {
tp: MType.NetworkRequest, tp: MType.NetworkRequest,
@ -1091,7 +1112,7 @@ export default function translate(tMsg: TrackerMessage): RawMessage | null {
transferredBodySize: tMsg[9], transferredBodySize: tMsg[9],
} }
} }
case 84: { case 84: {
return { return {
tp: MType.WsChannel, tp: MType.WsChannel,
@ -1103,7 +1124,30 @@ export default function translate(tMsg: TrackerMessage): RawMessage | null {
messageType: tMsg[6], messageType: tMsg[6],
} }
} }
case 85: {
return {
tp: MType.ResourceTiming,
timestamp: tMsg[1],
duration: tMsg[2],
ttfb: tMsg[3],
headerSize: tMsg[4],
encodedBodySize: tMsg[5],
decodedBodySize: tMsg[6],
url: tMsg[7],
initiator: tMsg[8],
transferredSize: tMsg[9],
cached: tMsg[10],
queueing: tMsg[11],
dnsLookup: tMsg[12],
initialConnection: tMsg[13],
ssl: tMsg[14],
contentDownload: tMsg[15],
total: tMsg[16],
stalled: tMsg[17],
}
}
case 89: { case 89: {
return { return {
tp: MType.LongAnimationTask, tp: MType.LongAnimationTask,
@ -1115,7 +1159,7 @@ export default function translate(tMsg: TrackerMessage): RawMessage | null {
scripts: tMsg[6], scripts: tMsg[6],
} }
} }
case 113: { case 113: {
return { return {
tp: MType.SelectionChange, tp: MType.SelectionChange,
@ -1124,14 +1168,14 @@ export default function translate(tMsg: TrackerMessage): RawMessage | null {
selection: tMsg[3], selection: tMsg[3],
} }
} }
case 114: { case 114: {
return { return {
tp: MType.MouseThrashing, tp: MType.MouseThrashing,
timestamp: tMsg[1], timestamp: tMsg[1],
} }
} }
case 116: { case 116: {
return { return {
tp: MType.ResourceTimingDeprecated, tp: MType.ResourceTimingDeprecated,
@ -1147,21 +1191,21 @@ export default function translate(tMsg: TrackerMessage): RawMessage | null {
cached: tMsg[10], cached: tMsg[10],
} }
} }
case 117: { case 117: {
return { return {
tp: MType.TabChange, tp: MType.TabChange,
tabId: tMsg[1], tabId: tMsg[1],
} }
} }
case 118: { case 118: {
return { return {
tp: MType.TabData, tp: MType.TabData,
tabId: tMsg[1], tabId: tMsg[1],
} }
} }
case 119: { case 119: {
return { return {
tp: MType.CanvasNode, tp: MType.CanvasNode,
@ -1169,14 +1213,14 @@ export default function translate(tMsg: TrackerMessage): RawMessage | null {
timestamp: tMsg[2], timestamp: tMsg[2],
} }
} }
case 120: { case 120: {
return { return {
tp: MType.TagTrigger, tp: MType.TagTrigger,
tagId: tMsg[1], tagId: tMsg[1],
} }
} }
case 121: { case 121: {
return { return {
tp: MType.Redux, tp: MType.Redux,
@ -1186,7 +1230,7 @@ export default function translate(tMsg: TrackerMessage): RawMessage | null {
actionTime: tMsg[4], actionTime: tMsg[4],
} }
} }
case 122: { case 122: {
return { return {
tp: MType.SetPageLocation, tp: MType.SetPageLocation,
@ -1196,7 +1240,7 @@ export default function translate(tMsg: TrackerMessage): RawMessage | null {
documentTitle: tMsg[4], documentTitle: tMsg[4],
} }
} }
case 123: { case 123: {
return { return {
tp: MType.GraphQl, tp: MType.GraphQl,
@ -1207,7 +1251,7 @@ export default function translate(tMsg: TrackerMessage): RawMessage | null {
duration: tMsg[5], duration: tMsg[5],
} }
} }
default: default:
return null return null
} }

View file

@ -70,6 +70,7 @@ export declare const enum Type {
PartitionedMessage = 82, PartitionedMessage = 82,
NetworkRequest = 83, NetworkRequest = 83,
WSChannel = 84, WSChannel = 84,
ResourceTiming = 85,
LongAnimationTask = 89, LongAnimationTask = 89,
InputChange = 112, InputChange = 112,
SelectionChange = 113, SelectionChange = 113,
@ -113,7 +114,7 @@ export type SetViewportScroll = [
export type CreateDocument = [ export type CreateDocument = [
/*type:*/ Type.CreateDocument, /*type:*/ Type.CreateDocument,
] ]
export type CreateElementNode = [ export type CreateElementNode = [
@ -571,6 +572,27 @@ export type WSChannel = [
/*messageType:*/ string, /*messageType:*/ string,
] ]
export type ResourceTiming = [
/*type:*/ Type.ResourceTiming,
/*timestamp:*/ number,
/*duration:*/ number,
/*ttfb:*/ number,
/*headerSize:*/ number,
/*encodedBodySize:*/ number,
/*decodedBodySize:*/ number,
/*url:*/ string,
/*initiator:*/ string,
/*transferredSize:*/ number,
/*cached:*/ boolean,
/*queueing:*/ number,
/*dnsLookup:*/ number,
/*initialConnection:*/ number,
/*ssl:*/ number,
/*contentDownload:*/ number,
/*total:*/ number,
/*stalled:*/ number,
]
export type LongAnimationTask = [ export type LongAnimationTask = [
/*type:*/ Type.LongAnimationTask, /*type:*/ Type.LongAnimationTask,
/*name:*/ string, /*name:*/ string,
@ -675,5 +697,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 | LongAnimationTask | 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 | CSSInsertRule | CSSDeleteRule | Fetch | Profiler | OTable | StateAction | ReduxDeprecated | Vuex | MobX | NgRx | GraphQLDeprecated | PerformanceTrack | StringDictDeprecated | SetNodeAttributeDictDeprecated | StringDict | SetNodeAttributeDict | ResourceTimingDeprecatedDeprecated | ConnectionInformation | SetPageVisibility | LoadFontFace | SetNodeFocus | LongTask | SetNodeAttributeURLBased | SetCSSDataURLBased | TechnicalInfo | CustomIssue | CSSInsertRuleURLBased | MouseClick | MouseClickDeprecated | CreateIFrameDocument | AdoptedSSReplaceURLBased | AdoptedSSInsertRuleURLBased | AdoptedSSDeleteRule | AdoptedSSAddOwner | AdoptedSSRemoveOwner | JSException | Zustand | BatchMetadata | PartitionedMessage | NetworkRequest | WSChannel | ResourceTiming | LongAnimationTask | InputChange | SelectionChange | MouseThrashing | UnbindNodes | ResourceTimingDeprecated | TabChange | TabData | CanvasNode | TagTrigger | Redux | SetPageLocation | GraphQL | WebVitals
export default Message export default Message

View file

@ -50,11 +50,11 @@ export function SetViewportScroll(
} }
export function CreateDocument( export function CreateDocument(
): Messages.CreateDocument { ): Messages.CreateDocument {
return [ return [
Messages.Type.CreateDocument, Messages.Type.CreateDocument,
] ]
} }
@ -905,6 +905,47 @@ export function WSChannel(
] ]
} }
export function ResourceTiming(
timestamp: number,
duration: number,
ttfb: number,
headerSize: number,
encodedBodySize: number,
decodedBodySize: number,
url: string,
initiator: string,
transferredSize: number,
cached: boolean,
queueing: number,
dnsLookup: number,
initialConnection: number,
ssl: number,
contentDownload: number,
total: number,
stalled: number,
): Messages.ResourceTiming {
return [
Messages.Type.ResourceTiming,
timestamp,
duration,
ttfb,
headerSize,
encodedBodySize,
decodedBodySize,
url,
initiator,
transferredSize,
cached,
queueing,
dnsLookup,
initialConnection,
ssl,
contentDownload,
total,
stalled,
]
}
export function LongAnimationTask( export function LongAnimationTask(
name: string, name: string,
duration: number, duration: number,
@ -1096,3 +1137,4 @@ export function WebVitals(
value, value,
] ]
} }

View file

@ -27,7 +27,7 @@ export default class MessageEncoder extends PrimitiveEncoder {
break break
case Messages.Type.CreateDocument: case Messages.Type.CreateDocument:
return true return true
break break
case Messages.Type.CreateElementNode: case Messages.Type.CreateElementNode:
@ -282,6 +282,10 @@ export default class MessageEncoder extends PrimitiveEncoder {
return this.string(msg[1]) && this.string(msg[2]) && this.string(msg[3]) && this.uint(msg[4]) && this.string(msg[5]) && this.string(msg[6]) return this.string(msg[1]) && this.string(msg[2]) && this.string(msg[3]) && this.uint(msg[4]) && this.string(msg[5]) && this.string(msg[6])
break break
case Messages.Type.ResourceTiming:
return this.uint(msg[1]) && this.uint(msg[2]) && this.uint(msg[3]) && this.uint(msg[4]) && this.uint(msg[5]) && this.uint(msg[6]) && this.string(msg[7]) && this.string(msg[8]) && this.uint(msg[9]) && this.boolean(msg[10]) && this.uint(msg[11]) && this.uint(msg[12]) && this.uint(msg[13]) && this.uint(msg[14]) && this.uint(msg[15]) && this.uint(msg[16]) && this.uint(msg[17])
break
case Messages.Type.LongAnimationTask: case Messages.Type.LongAnimationTask:
return this.string(msg[1]) && this.int(msg[2]) && this.int(msg[3]) && this.int(msg[4]) && this.int(msg[5]) && this.string(msg[6]) return this.string(msg[1]) && this.int(msg[2]) && this.int(msg[3]) && this.int(msg[4]) && this.int(msg[5]) && this.string(msg[6])
break break