feat(replay): Add additional properties for UI clicks#7395
Conversation
For replay click breadcrumbs, add the following properties: * tag name * text content * element attributes
| node: { | ||
| id: serializedNode.id, | ||
| tagName: serializedNode.tagName, | ||
| textContent: targetNode ? Array.from(targetNode.childNodes).filter((node: Node | INode) => '__sn' in node && node.__sn.type === NodeType.Text).map(node => node.textContent) : '', |
There was a problem hiding this comment.
I plan on capping the size of this value to 256 characters. No action item but I thought I would mention it.
There was a problem hiding this comment.
@cmanallen should backend add additional metadata when it changes the payload? This means frontend could more easily tell user what payloads were modified and why.
size-limit report 📦
|
| expect.arrayContaining([ | ||
| { | ||
| ...expectedClickBreadcrumb, | ||
| message: 'body > button#error', |
There was a problem hiding this comment.
Removing this as it can leak attributes (e.g. aria label) that are masked with maskAllText
| <body> | ||
| <button id="go-background">Go to background</button> | ||
| <button id="error">Throw Error</button> | ||
| <div role="button" id="error" class="btn btn-error" aria-label="Throw Error">Throw Error</div> |
There was a problem hiding this comment.
Since the errorMode and errorsInSession tests were already capturing this breadcrumb, decided to add attributes here and make sure they were captured.
| "@babel/core": "^7.17.5", | ||
| "@sentry-internal/replay-worker": "7.42.0", | ||
| "@sentry-internal/rrweb": "1.105.0", | ||
| "@sentry-internal/rrweb-snapshot": "1.105.0", |
There was a problem hiding this comment.
imported a type and enum
Replay SDK metrics 🚀
develop |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Revision | LCP | CLS | CPU | JS heap avg | JS heap max | netTx | netRx | netCount | netTime |
|---|---|---|---|---|---|---|---|---|---|
| ef6b3c7 | -10.10 ms | +0.23 ms | +15.85 pp | +7.66 MB | +10.56 MB | +107.49 kB | +836 B | +4 | +209.40 ms |
| b1ef00d | +5.17 ms | +0.26 ms | +15.95 pp | +7.59 MB | +10.18 MB | +107.02 kB | -220 B | +4 | +306.46 ms |
| 42e542e | +12.94 ms | +0.25 ms | +18.24 pp | +7.8 MB | +10.31 MB | +107.39 kB | -2.17 kB | +4 | +289.66 ms |
| 2f3c93c | +6.35 ms | +0.26 ms | +16.82 pp | +7.44 MB | +9.99 MB | +106.58 kB | +1.53 kB | +4 | +303.23 ms |
| 4bff5a9 | +0.60 ms | +0.26 ms | +15.70 pp | +7.44 MB | +10.2 MB | +106.93 kB | -2.04 kB | +4 | +163.67 ms |
| ba99e7c | -0.34 ms | +0.23 ms | +16.45 pp | +7.17 MB | +10.05 MB | +106.7 kB | +2.46 kB | +4 | +119.03 ms |
| a70376e | -7.64 ms | +0.25 ms | +17.86 pp | +6.5 MB | +10.21 MB | +106.82 kB | -35 B | +4 | +321.76 ms |
| e358e16 | +7.09 ms | +0.26 ms | +18.60 pp | +7.46 MB | +10.03 MB | +106.61 kB | -943 B | +4 | +99.84 ms |
| 5e27e8f | -2.27 ms | +0.24 ms | +16.19 pp | +7.72 MB | +10.33 MB | +107.49 kB | +566 B | +4 | +192.11 ms |
Previous results on branch: feat-replay-add-more-dom-attributes-on-click
feat-replay-add-more-dom-attributes-on-click| Revision | LCP | CLS | CPU | JS heap avg | JS heap max | netTx | netRx | netCount | netTime |
|---|---|---|---|---|---|---|---|---|---|
| ef6b3c7 | -7.70 ms | +0.25 ms | +16.28 pp | +7.64 MB | +10.02 MB | +107.46 kB | +57 B | +4 | +222.84 ms |
| ef6b3c7 | -10.10 ms | +0.23 ms | +15.85 pp | +7.66 MB | +10.56 MB | +107.49 kB | +836 B | +4 | +209.40 ms |
| b1ef00d | +5.17 ms | +0.26 ms | +15.95 pp | +7.59 MB | +10.18 MB | +107.02 kB | -220 B | +4 | +306.46 ms |
| 42e542e | +12.94 ms | +0.25 ms | +18.24 pp | +7.8 MB | +10.31 MB | +107.39 kB | -2.17 kB | +4 | +289.66 ms |
| 2f3c93c | +6.35 ms | +0.26 ms | +16.82 pp | +7.44 MB | +9.99 MB | +106.58 kB | +1.53 kB | +4 | +303.23 ms |
| 4bff5a9 | +0.60 ms | +0.26 ms | +15.70 pp | +7.44 MB | +10.2 MB | +106.93 kB | -2.04 kB | +4 | +163.67 ms |
| ba99e7c | -0.34 ms | +0.23 ms | +16.45 pp | +7.17 MB | +10.05 MB | +106.7 kB | +2.46 kB | +4 | +119.03 ms |
| a70376e | -7.64 ms | +0.25 ms | +17.86 pp | +6.5 MB | +10.21 MB | +106.82 kB | -35 B | +4 | +321.76 ms |
| e358e16 | +7.09 ms | +0.26 ms | +18.60 pp | +7.46 MB | +10.03 MB | +106.61 kB | -943 B | +4 | +99.84 ms |
| 5e27e8f | -2.27 ms | +0.24 ms | +16.19 pp | +7.72 MB | +10.33 MB | +107.49 kB | +566 B | +4 | +192.11 ms |
Last updated: Wed, 15 Mar 2023 22:55:00 GMT
| if (key === 'data-testid' || key === 'data-test-id') { | ||
| normalizedKey = 'testId'; | ||
| } |
There was a problem hiding this comment.
@ryan953 let's capture both and normal to testId?
For replay click breadcrumbs, add the following properties:
Closes #7394