feat(perf-issues): respect span render blocking status in detector#44981
Merged
mjq-sentry merged 1 commit intomasterfrom Feb 22, 2023
Merged
feat(perf-issues): respect span render blocking status in detector#44981mjq-sentry merged 1 commit intomasterfrom
mjq-sentry merged 1 commit intomasterfrom
Conversation
As of browser SDK 7.38.0, we now log the render-blocking status reported by the browser in resource spans' `data` hash. If a value is present and that value is `non-blocking`, ignore our heuristics and treat the value as non-blocking. 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.
k-fish
approved these changes
Feb 22, 2023
Member
k-fish
left a comment
There was a problem hiding this comment.
👍 checking for non-blocking to exclude it vs. render blocking to include.
|
|
||
| def _is_blocking_render(self, span): | ||
| data = span.get("data", None) | ||
| render_blocking_status = data and data.get("resource.render_blocking_status") |
Member
There was a problem hiding this comment.
Suggested change
| render_blocking_status = data and data.get("resource.render_blocking_status") | |
| render_blocking_status = data and data.get("resource.render_blocking_status", None) |
protect against missing field? or nah
2 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
As of browser SDK 7.38.0, we now log the render-blocking status reported by the browser in resource spans'
datahash. (Background info: MDN). If a value is present and that span isnon-blocking, ignore our heuristics and treat the resource as non-blocking in the Large Render Blocking Asset detector.This PR 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.