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

View file

@ -1419,6 +1419,63 @@ func DecodeWSChannel(reader BytesReader) (Message, error) {
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) {
var err error = nil
msg := &LongAnimationTask{}
@ -1440,9 +1497,6 @@ func DecodeLongAnimationTask(reader BytesReader) (Message, error) {
if msg.Scripts, err = reader.ReadString(); err != nil {
return nil, err
}
if msg.Stalled, err = reader.ReadUint(); err != nil {
return nil, err
}
return msg, err
}
@ -2275,6 +2329,8 @@ func ReadMessage(t uint64, reader BytesReader) (Message, error) {
return DecodeNetworkRequest(reader)
case 84:
return DecodeWSChannel(reader)
case 85:
return DecodeResourceTiming(reader)
case 89:
return DecodeLongAnimationTask(reader)
case 112:

View file

@ -806,6 +806,29 @@ class WSChannel(Message):
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):
__id__ = 89
@ -1177,3 +1200,5 @@ class MobileIssueEvent(Message):
self.context_string = context_string
self.context = context
self.payload = payload

View file

@ -1200,6 +1200,47 @@ cdef class WSChannel(PyMessage):
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 public int __id__
cdef public str name
@ -1764,3 +1805,5 @@ cdef class MobileIssueEvent(PyMessage):
self.context_string = context_string
self.context = context
self.payload = payload

View file

@ -729,6 +729,27 @@ class MessageCodec(Codec):
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:
return LongAnimationTask(
name=self.read_string(reader),
@ -1029,3 +1050,4 @@ class MessageCodec(Codec):
context=self.read_string(reader),
payload=self.read_string(reader)
)

View file

@ -827,6 +827,27 @@ cdef class MessageCodec:
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:
return LongAnimationTask(
name=self.read_string(reader),
@ -1127,3 +1148,4 @@ cdef class MessageCodec:
context=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: {
const name = this.readString(); if (name === null) { return resetPointer() }
const duration = this.readInt(); if (duration === null) { return resetPointer() }

View file

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

View file

@ -60,6 +60,7 @@ export const enum MType {
Zustand = 79,
NetworkRequest = 83,
WsChannel = 84,
ResourceTiming = 85,
LongAnimationTask = 89,
SelectionChange = 113,
MouseThrashing = 114,
@ -330,8 +331,8 @@ export interface RawSetNodeAttributeDict {
value: string,
}
export interface RawResourceTimingDeprecated {
tp: MType.ResourceTimingDeprecated,
export interface RawResourceTimingDeprecatedDeprecated {
tp: MType.ResourceTimingDeprecatedDeprecated,
timestamp: number,
duration: number,
ttfb: number,
@ -499,6 +500,27 @@ export interface RawWsChannel {
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 {
tp: MType.LongAnimationTask,
name: string,
@ -521,8 +543,8 @@ export interface RawMouseThrashing {
timestamp: number,
}
export interface RawResourceTiming {
tp: MType.ResourceTiming,
export interface RawResourceTimingDeprecated {
tp: MType.ResourceTimingDeprecated,
timestamp: number,
duration: 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,
83: MType.NetworkRequest,
84: MType.WsChannel,
85: MType.ResourceTiming,
89: MType.LongAnimationTask,
113: MType.SelectionChange,
114: MType.MouseThrashing,

View file

@ -489,6 +489,27 @@ type TrWSChannel = [
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: 89,
name: string,
@ -593,7 +614,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 | 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 {
switch(tMsg[0]) {
@ -1104,6 +1125,29 @@ export default function translate(tMsg: TrackerMessage): RawMessage | null {
}
}
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: {
return {
tp: MType.LongAnimationTask,

View file

@ -70,6 +70,7 @@ export declare const enum Type {
PartitionedMessage = 82,
NetworkRequest = 83,
WSChannel = 84,
ResourceTiming = 85,
LongAnimationTask = 89,
InputChange = 112,
SelectionChange = 113,
@ -571,6 +572,27 @@ export type WSChannel = [
/*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 = [
/*type:*/ Type.LongAnimationTask,
/*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

View file

@ -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(
name: string,
duration: number,
@ -1096,3 +1137,4 @@ export function WebVitals(
value,
]
}

View file

@ -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])
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:
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