-
Notifications
You must be signed in to change notification settings - Fork 137
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(rum-core): capture XHR/Fetch spans using resource timing #825
Conversation
💚 Build SucceededExpand to view the summary
Build stats
Test stats 🧪
Steps errorsExpand to view the steps failures
|
packages/rum-core/src/performance-monitoring/capture-navigation.js
Outdated
Show resolved
Hide resolved
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.
Thanks @vigneshshanmugam
A simpler solution for this issue might be to store the time we patch XHR (execution time) and use that time to capture spans from the resource timing, i.e. all the resources that have their start time before our execution time should be captured from the resource timing and all the rest are captured by the xhr patch. this would avoid having to loop over the spans to find the unique ones. Have you considered this solution?
side note: the execution time can be stored in the state
object that will be introduced with #813
@jahtalab Nice suggestion 👍, I had the similar thought initially(not now) when i started working on RUM on why we were using filterUrls instead of patch time. I thought the reason we didn't go for that solution was due to two reasons.
But as you said, It's simpler solution without doing the |
483619b
to
44f42e1
Compare
📦 Bundlesize report
|
6f98ba7
to
56c1295
Compare
packages/rum-core/src/performance-monitoring/capture-navigation.js
Outdated
Show resolved
Hide resolved
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.
@vigneshshanmugam , Have you looked at the tests? is there an issue?
@jahtalab Its just travis. The tests passed though- https://travis-ci.org/github/elastic/apm-agent-rum-js/builds/703572041. I am going to ignore it. |
* upstream/master: (23 commits) feat(rum-core): capture XHR/Fetch spans using resource timing (elastic#825) docs: update set-up.asciidoc (elastic#814) chore: remove compressed size gh workflow (elastic#828) feat: use page visibilityState for browser responsiveness check (elastic#813) ci(jenkins): report bundlesize as a GitHub comment (elastic#826) docs: release notes for 5.2.1 (elastic#824) chore(release): publish fix(rum-core): protect aganist buggy navigation timing data (elastic#819) fix(rum-core): protect aganist buggy navigation timing data (elastic#819) chore(rum-core): use startTime for LCP marks (elastic#815) fix(rum-core): capture tbt after all task entries are observed (elastic#803) feat(rum-react): use correct path when route is path array (elastic#800) ci: enable benchmark on a PR basis (elastic#812) ci: use dockerLogs step (elastic#810) fix: env var invalid type (elastic#809) fix: workarount for elastic/beats#18858 (elastic#807) docs: add release notes for 5.2.0 (elastic#801) chore(release): publish fix(rum-core): consider user defined type of high precedence (elastic#798) fix(rum): use single instance of apm across all packages (elastic#796) ...
…c#825) * feat(rum-core): capture XHR/Fetch using resource timing * chore: add tests and update fixtures * chore: filter intake api from spans * chore: handle duplicate url fetch before patch * chore: add more tests for fitering logic * chore: modify the logic as per review * chore: fix test * chore: move to state object and fix test * chore: add guard for patch time * chore: address review
resource.*
wont work.Ignore the Intake API endpoint using resource name, as we could end up creating lots of spans for every events beacon and we cannot rely on bootstrap time and start time (browser bugs) for this endpoint alone.
Comparison logic is modified to take two things in to account
TODO
/example request
happened before agent script kicks in and another/example
request caught via patching. These are two separate requests and we must create two spans instead of one.