New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(tracing): Track PerformanceResourceTiming.renderBlockingStatus
#7127
Conversation
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.
Adds mention of new data on resource spans, see getsentry/sentry-javascript#7127
size-limit report 📦
|
@@ -361,6 +362,9 @@ export function _addResourceSpans( | |||
if ('decodedBodySize' in entry) { | |||
data['Decoded Body Size'] = entry.decodedBodySize; | |||
} | |||
if ('renderBlockingStatus' in entry) { | |||
data['Render Blocking Status'] = entry.renderBlockingStatus; |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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 👍
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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?
Replay SDK metrics 🚀
develop |
Revision | LCP | CLS | CPU | JS heap avg | JS heap max | netTx | netRx | netCount | netTime |
---|---|---|---|---|---|---|---|---|---|
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 |
Last updated: Thu, 09 Feb 2023 20:39:45 GMT
@@ -77,6 +77,7 @@ export function Transaction(obj?: Partial<Event>): any { | |||
'Transfer Size': 1097, | |||
'Encoded Body Size': 797, | |||
'Decoded Body Size': 1885, | |||
'resource.render_blocking_status': 'non-blocking', |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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!
PerformanceResourceTiming.renderBlockingStatus
* docs(sdk): Update render blocking status. Adds mention of new data on resource spans, see getsentry/sentry-javascript#7127
…#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.
…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.
…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.
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.