-
Notifications
You must be signed in to change notification settings - Fork 1.4k
docs: Modify Browser SPA docs for soft nav 2.1 feature GA #21716
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
Conversation
Hi @cwli24 👋 Thanks for your pull request! Your PR is in a queue, and a writer will take a look soon. We generally publish small edits within one business day, and larger edits within three days. Please ensure the propsed changes look good by building it first in your local environment. Refer to this contribution guide to get the site up and running in your local. If you really require a preview url, reach out to one of the writers and they will generate one for you. |
netlify build fork |
✅ Your PR has been mirrored to our repository as PR #21779. |
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.
Please review the suggested changes and update.
|
||
<Callout variant="important"> | ||
The `createTracer` method in the SPA API has been deprecated. The recommended way to trace the duration of a task is to capture a performance [mark](https://developer.mozilla.org/en-US/docs/Web/API/Performance/mark) and/or [measure](https://developer.mozilla.org/en-US/docs/Web/API/Performance/measure). Future browser agent versions will capture marks and measures automatically, at which point support for `createTracer` will cease. | ||
The `createTracer` method in the SPA API has been deprecated. The recommended way to trace the duration of a task is to capture a performance [mark](https://developer.mozilla.org/en-US/docs/Web/API/Performance/mark) and/or [measure](https://developer.mozilla.org/en-US/docs/Web/API/Performance/measure) for measuring callback execution time. In SPA v2+, this method has become a dummy method that no longer work to tie JS execution to interactions or keep them open--it effectively does nothing! |
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.
The `createTracer` method in the SPA API has been deprecated. The recommended way to trace the duration of a task is to capture a performance [mark](https://developer.mozilla.org/en-US/docs/Web/API/Performance/mark) and/or [measure](https://developer.mozilla.org/en-US/docs/Web/API/Performance/measure) for measuring callback execution time. In SPA v2+, this method has become a dummy method that no longer work to tie JS execution to interactions or keep them open--it effectively does nothing! | |
The `createTracer` method in the SPA API has been deprecated. The recommended way to trace the duration of a task is to capture a performance [mark](https://developer.mozilla.org/en-US/docs/Web/API/Performance/mark) and/or [measure](https://developer.mozilla.org/en-US/docs/Web/API/Performance/measure) for measuring callback execution time. this method is now inactive and no longer functions to link JavaScript execution with interactions or maintain them open. |
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's a capitalization issue in here, and "maintain them open" is grammatically incorrect (Gemini verified this).
## Description | ||
|
||
This SPA method will end the browser interaction at the current time. Any subsequent callbacks or requests will not be included as part of the SPA interaction. | ||
This SPA method will end the browser interaction at the current time. Any subsequent network requests that start after this method is called will not be included as part of the current SPA interaction. In SPA v2.1+, this can also be used to terminate an interaction in a pending state that's monitoring for any long task in a 5s window. |
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.
This SPA method will end the browser interaction at the current time. Any subsequent network requests that start after this method is called will not be included as part of the current SPA interaction. In SPA v2.1+, this can also be used to terminate an interaction in a pending state that's monitoring for any long task in a 5s window. | |
This SPA method will end the browser interaction at the current time. Any subsequent network requests that begin after this method is called will not be included as part of the current SPA interaction. In SPA v2.1 and later, this method can also be used to terminate an interaction in a pending state when monitoring for any long task in a 5-second window. |
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 want to emphasize that the interaction itself is doing the monitoring. A better edit here according to Gemini would be "pending state and is monitoring for" OR "pending state that monitors for" -- either of which I can agree with. Can you pick one of these and update your suggested change?
src/content/docs/browser/new-relic-browser/browser-apis/interaction.mdx
Outdated
Show resolved
Hide resolved
src/content/docs/browser/new-relic-browser/browser-apis/interaction.mdx
Outdated
Show resolved
Hide resolved
src/content/docs/browser/new-relic-browser/browser-apis/interaction.mdx
Outdated
Show resolved
Hide resolved
src/content/docs/browser/single-page-app-monitoring/use-spa-data/spa-data-collection.mdx
Outdated
Show resolved
Hide resolved
src/content/docs/browser/single-page-app-monitoring/use-spa-data/spa-data-collection.mdx
Outdated
Show resolved
Hide resolved
src/content/docs/browser/single-page-app-monitoring/use-spa-data/spa-data-collection.mdx
Outdated
Show resolved
Hide resolved
Following these steps, browser interactions are considered finished on the next repaint frame. They will also associate XHR and fetch requests started within their span. v2.1 introduced another step: | ||
|
||
All apps are different and have different monitoring needs. That's why we include default monitoring as well as the ability to set up custom monitoring for any browser interactions you choose. | ||
4. Monitor for long running callbacks for a period of 5 seconds. If any are detected, extend the interaction and repeat. |
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.
4. Monitor for long running callbacks for a period of 5 seconds. If any are detected, extend the interaction and repeat. | |
4. For SPA v2.1, Monitor for long running callbacks for a period of 5 seconds. If any are detected, extend the interaction and repeat. |
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.
4. Monitor for long running callbacks for a period of 5 seconds. If any are detected, extend the interaction and repeat. | |
4. For SPA v2.1 and onward: monitor for long running callbacks for a period of 5 seconds. If any are detected, extend the interaction and repeat. |
Like this?
src/content/docs/browser/single-page-app-monitoring/use-spa-data/spa-data-collection.mdx
Outdated
Show resolved
Hide resolved
Hi @cwli24 . I have reviewed and added my comments in the PR. Please fix those. |
…ction.mdx Co-authored-by: sujitnewrelic <sujitkumarswain@newrelic.com>
…ction.mdx Co-authored-by: sujitnewrelic <sujitkumarswain@newrelic.com>
Co-authored-by: sujitnewrelic <sujitkumarswain@newrelic.com>
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.
lgtm
Please follow conventional commit standards
in your commit messages and pull request title.
Give us some context
Follow up to #20194 . Browser Agent is nearing roll out phase (target end of month) for replacing old SPA with newer soft nav feature, with the additional add of long task consideration aka SPA 2.1.
Important: Please do not merge until agent is ready or we give the go-ahead signal.