Skip to content

feat(tracing): Track PerformanceResourceTiming.renderBlockingStatus - #7127

Merged
k-fish merged 2 commits into
developfrom
ref/perf-add-render-blocking-status
Feb 13, 2023
Merged

feat(tracing): Track PerformanceResourceTiming.renderBlockingStatus#7127
k-fish merged 2 commits into
developfrom
ref/perf-add-render-blocking-status

Conversation

@k-fish

Copy link
Copy Markdown
Member

As per https://developer.mozilla.org/en-US/docs/Web/API/PerformanceResourceTiming/renderBlockingStatus the resource timing has information about whether an asset is blocking render or not, which is useful for determining which assets need to be addressed for fixing critical path.

As per https://developer.mozilla.org/en-US/docs/Web/API/PerformanceResourceTiming/renderBlockingStatus the resource timing has information about whether an asset is blocking render or not, which is useful for determining which assets need to be addressed for fixing critical path.
@k-fish
k-fish requested review from a team, AbhiPrasad and lforst and removed request for a teamFebruary 9, 2023 17:38
k-fish added a commit to getsentry/develop that referenced this pull request Feb 9, 2023
@github-actions

github-actionsBot commented Feb 9, 2023

Copy link
Copy Markdown
Contributor

size-limit report 📦

PathSize
@sentry/browser - ES5 CDN Bundle (gzipped + minified)20.07 KB (-0.01% 🔽)
@sentry/browser - ES5 CDN Bundle (minified)62.2 KB (0%)
@sentry/browser - ES6 CDN Bundle (gzipped + minified)18.7 KB (+0.01% 🔺)
@sentry/browser - ES6 CDN Bundle (minified)55.34 KB (0%)
@sentry/browser - Webpack (gzipped + minified)20.43 KB (0%)
@sentry/browser - Webpack (minified)66.78 KB (0%)
@sentry/react - Webpack (gzipped + minified)20.46 KB (0%)
@sentry/nextjs Client - Webpack (gzipped + minified)47.88 KB (+0.07% 🔺)
@sentry/browser + @sentry/tracing - ES5 CDN Bundle (gzipped + minified)27.02 KB (+0.15% 🔺)
@sentry/browser + @sentry/tracing - ES6 CDN Bundle (gzipped + minified)25.28 KB (+0.15% 🔺)
@sentry/replay ES6 CDN Bundle (gzipped + minified)42.27 KB (0%)
@sentry/replay - Webpack (gzipped + minified)36.7 KB (0%)
@sentry/browser + @sentry/tracing + @sentry/replay - ES6 CDN Bundle (gzipped + minified)59.97 KB (+0.07% 🔺)
@sentry/browser + @sentry/replay - ES6 CDN Bundle (gzipped + minified)53.49 KB (+0.01% 🔺)

data['Decoded Body Size'] = entry.decodedBodySize;
}
if ('renderBlockingStatus' in entry) {
data['Render Blocking Status'] = entry.renderBlockingStatus;

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

so, I would like our data fields to move toward being similar to otel span attributes in formatting, lowercase and snake case, with period separators similar to span operation.

Can we use resource.render_blocking_status instead here?

see trace semantic conventions: https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/trace/semantic_conventions/README.md

Copy link
Copy Markdown
MemberAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was actually going to mention this, it was wild there are spaces etc. Very in 👍

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yeah not ideal we have Decoded Body Size, maybe we can change this too though? I kept it as is for backwards compat sake, but if we can update the detectors we can change it here as well.

Copy link
Copy Markdown
MemberAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If you want to look at changing these existing fields, we'd have to have both for a while (maybe 30d), are we fine with that?

@github-actions

Copy link
Copy Markdown
Contributor

Replay SDK metrics 🚀

Plain+Sentry+Replay
RevisionValueValueDiffRatioValueDiffRatio
LCPThis PR 7e57cb774.43 ms95.51 ms+21.08 ms+28.32 %122.32 ms+47.89 ms+64.34 %
Previous 538c3a667.84 ms95.01 ms+27.17 ms+40.04 %131.47 ms+63.63 ms+93.78 %
CLSThis PR 7e57cb70.06 ms0.06 ms-0.00 ms-0.03 %0.06 ms+0.00 ms+0.05 %
Previous 538c3a60.06 ms0.06 ms+0.00 ms+0.02 %0.06 ms+0.00 ms+0.07 %
CPUThis PR 7e57cb717.56 %17.02 %-0.53 pp-3.04 %28.15 %+10.59 pp+60.33 %
Previous 538c3a612.41 %13.75 %+1.34 pp+10.81 %26.55 %+14.14 pp+113.94 %
JS heap avgThis PR 7e57cb71.93 MB2.08 MB+144.88 kB+7.49 %3.03 MB+1.09 MB+56.56 %
Previous 538c3a61.94 MB2 MB+57.01 kB+2.94 %3.01 MB+1.07 MB+55.46 %
JS heap maxThis PR 7e57cb72.32 MB2.59 MB+275.35 kB+11.88 %4.53 MB+2.21 MB+95.29 %
Previous 538c3a62.3 MB2.57 MB+265.36 kB+11.52 %4.47 MB+2.16 MB+93.94 %
netTxThis PR 7e57cb70 B0 B0 Bn/a2.59 kB+2.59 kBn/a
Previous 538c3a60 B0 B0 Bn/a2.6 kB+2.6 kBn/a
netRxThis PR 7e57cb70 B0 B0 Bn/a41 B+41 Bn/a
Previous 538c3a60 B0 B0 Bn/a41 B+41 Bn/a
netCountThis PR 7e57cb7000n/a1+1n/a
Previous 538c3a6000n/a1+1n/a
netTimeThis PR 7e57cb70.00 ms0.00 ms0.00 msn/a72.93 ms+72.93 msn/a
Previous 538c3a60.00 ms0.00 ms0.00 msn/a112.08 ms+112.08 msn/a

Previous results on branch: develop

RevisionLCPCLSCPUJS heap avgJS heap maxnetTxnetRxnetCountnetTime
538c3a6+63.63 ms+0.00 ms+14.14 pp+1.07 MB+2.16 MB+2.6 kB+41 B+1+112.08 ms
fc7b716+52.44 ms+0.00 ms+14.74 pp+1.09 MB+2.21 MB+2.68 kB+41 B+1+89.64 ms

*) pp - percentage points - an absolute difference between two percentages.
Last updated: Thu, 09 Feb 2023 20:39:45 GMT

@AbhiPrasadAbhiPrasad added this to the Performance Issues milestone Feb 10, 2023
'Transfer Size': 1097,
'Encoded Body Size': 797,
'Decoded Body Size': 1885,
'resource.render_blocking_status': 'non-blocking',

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One more bikeshed convo :p

Right now the blocked_main_thread span data key is set in the mobile sdks, to get File I/O perf issues working.

Could we re-use that? I'm fine with not - this works with me as well.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Copy Markdown
MemberAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

To be clear you want to re-use the same key? I don't know about that, I'd prefer more closely matching the vendor implementation we're scraping from otherwise there will be work in the product to constantly explain the differences, vs. letting these keys be self-evident

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yup makes sense, let's keep this unique to browser!

@AbhiPrasadAbhiPrasad changed the title ref(perf): Add renderBlockingStatusfeat(tracing): Track resource renderBlockingStatusFeb 10, 2023
@AbhiPrasadAbhiPrasad changed the title feat(tracing): Track resource renderBlockingStatusfeat(tracing): Track resource render_blocking_statusFeb 13, 2023
@AbhiPrasadAbhiPrasad changed the title feat(tracing): Track resource render_blocking_statusfeat(tracing): Track PerformanceResourceTiming.renderBlockingStatusFeb 13, 2023
@k-fish
k-fish merged commit a961e57 into developFeb 13, 2023
@k-fish
k-fish deleted the ref/perf-add-render-blocking-status branch February 13, 2023 20:14
k-fish added a commit to getsentry/develop that referenced this pull request Feb 13, 2023
* docs(sdk): Update render blocking status.
Adds mention of new data on resource spans, see getsentry/sentry-javascript#7127
AbhiPrasad pushed a commit that referenced this pull request Feb 14, 2023
…#7127)
* ref(perf): Add renderBlockingStatus
As per https://developer.mozilla.org/en-US/docs/Web/API/PerformanceResourceTiming/renderBlockingStatus the resource timing has information about whether an asset is blocking render or not, which is useful for determining which assets need to be addressed for fixing critical path.
ramchaik pushed a commit to ramchaik/sentry-javascript that referenced this pull request Feb 14, 2023
…getsentry#7127)
* ref(perf): Add renderBlockingStatus
As per https://developer.mozilla.org/en-US/docs/Web/API/PerformanceResourceTiming/renderBlockingStatus the resource timing has information about whether an asset is blocking render or not, which is useful for determining which assets need to be addressed for fixing critical path.
mjq-sentry pushed a commit to getsentry/sentry that referenced this pull request Feb 22, 2023
…44981)
As of browser SDK 7.38.0, we now [log the render-blocking
status](getsentry/sentry-javascript#7127)
reported by the browser in resource spans' `data` hash. (Background
info:
[MDN](https://developer.mozilla.org/en-US/docs/Web/API/PerformanceResourceTiming/renderBlockingStatus)).
If a value is present and that span is `non-blocking`, ignore our
heuristics and treat the resource as non-blocking in the Large Render
Blocking Asset detector.
This commit also updates each test case to start from a valid event and then
minimally mutate it into an invalid one, because I was losing confidence
that each test was really testing what it should.
a-hariti pushed a commit to getsentry/sentry-docs that referenced this pull request Jun 8, 2024
* docs(sdk): Update render blocking status.
Adds mention of new data on resource spans, see getsentry/sentry-javascript#7127
stephanie-anderson pushed a commit to getsentry/sentry-docs that referenced this pull request Jun 10, 2024
* docs(sdk): Update render blocking status.
Adds mention of new data on resource spans, see getsentry/sentry-javascript#7127
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

@k-fish@AbhiPrasad