Skip to content
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(browser): Experimental features section #19238

Open
wants to merge 5 commits into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -21,3 +21,4 @@ Check out our key <InlinePopover type="browser"/> features:
* <DNT>[Browsers](/docs/browser/new-relic-browser/browser-pro-features/browsers-problem-patterns-type-or-platform/)</DNT>: View webpage data by browser type or platform
* <DNT>[Distributed tracing](/docs/browser/new-relic-browser/browser-pro-features/browser-data-distributed-tracing/)</DNT>: Connect backend and frontend performance
* <DNT>[Browser apps index](/docs/browser/new-relic-browser/getting-started/browser-apps-index/)</DNT>: View a list of all your browser apps
* <DNT>[Marks and measures](/docs/browser/new-relic-browser/browser-pro-features/marks-and-measures/)</DNT>: Automatically track native marks and measures
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
---
title: 'Automatically track native marks and measures'
tags:
- Browser
- Browser monitoring
- Experimental features
metaDescription: "Observes and reports on the performance of your webpages by automatically tracking native marks and measures."
freshnessValidatedDate: never
---

<Callout variant="important">
This is an experimental browser feature and is subject to change. Use this feature with caution. It's available only with the browser agent installed via copy/paste or NPM.
</Callout>


[Marks](https://developer.mozilla.org/en-US/docs/Web/API/Performance/mark) and [measures](https://developer.mozilla.org/en-US/docs/Web/API/Performance/measure) are standard methods to observe and report on the performance of your webpages. They're generic events native to the browser. You can use them to measure the duration of any task. The New Relic browser agent can automatically track marks and measures as store them as `BrowserPerformance` events.

## Enable marks and measures monitoring [#enable-feature]

To enable this feature:

1. Make sure you're using browser agent 1.272.0 or later.
2. Locate the agent code in your webpage HTML or JS application.
3. In the `init` configuration object, and add the `performance` feature configuration.

Here's an example to enable both marks and measures detection:
```js
<script type="text/javascript"> ;window.NREUM||(NREUM={});init={ …, performance: {capture_marks: true, capture_measures: true} }:
```
4. Deploy your app.

## Find your data in New Relic [#find-data]

Once enabled, the agent stores marks and measures data under the `BrowserPerformance` event type in New Relic. To find this data, try the following queries and then create custom dashboards to track performance.

Query 1: This NRQL query retrieves all `BrowserPerformance` events for the specified `appName` ("My Application") where the `entryName` is either `mark` or `measure`.

Check warning on line 36 in src/content/docs/browser/new-relic-browser/browser-pro-features/marks-and-measures.mdx

View workflow job for this annotation

GitHub Actions / vale-linter

[vale] reported by reviewdog 🐶 [Microsoft.FirstPerson] Use first person (such as 'My') sparingly. Raw Output: {"message": "[Microsoft.FirstPerson] Use first person (such as 'My') sparingly.", "location": {"path": "src/content/docs/browser/new-relic-browser/browser-pro-features/marks-and-measures.mdx", "range": {"start": {"line": 36, "column": 98}}}, "severity": "WARNING"}

```nrql
FROM BrowserPerformance SELECT * WHERE appName = 'My Application' AND entryName = 'mark' OR entryName = 'measure'
```

Query 2: This NRQL query calculates the average `entryDuration` for mark and measure events within the specified `appName`. The `FACET entryName` clause groups the results by the `entryName` field, providing separate average durations for mark and measure events. This can be useful for comparing the average performance of marks versus measures.

```nrql
FROM BrowserPerformance SELECT average(entryDuration) WHERE appName = 'My Application' AND entryName = 'mark' OR entryName = 'measure' FACET entryName
```

Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
---
title: 'Experimental features in browser monitoring'
metaDescription: "Opt-in to use experimental features in New Relic browser monitoring before they're generally available."
freshnessValidatedDate: never
---

New Relic browser agent offers a range of features to enhance your application monitoring capabilities. Some features are released in experimental state to ensure stability and reliability. These features may change or may lack support. You must use them with caution.

Check warning on line 7 in src/content/docs/browser/new-relic-browser/configuration/experimental-features.mdx

View workflow job for this annotation

GitHub Actions / vale-linter

[vale] reported by reviewdog 🐶 [Microsoft.Passive] 'are released' looks like passive voice. Raw Output: {"message": "[Microsoft.Passive] 'are released' looks like passive voice.", "location": {"path": "src/content/docs/browser/new-relic-browser/configuration/experimental-features.mdx", "range": {"start": {"line": 7, "column": 119}}}, "severity": "INFO"}


## Current experimental features

The following experimental features are available:
* Browser agent v1.272.0: [Automatically track native marks and measures as `BrowserPerformance` events](/docs/browser/new-relic-browser/browser-pro-features/marks-and-measures)
4 changes: 4 additions & 0 deletions src/nav/browser.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,8 @@ pages:
pages:
- title: Browser monitoring features
path: /docs/browser/new-relic-browser/browser-pro-features/browser-features
- title: Experimental features
path: /docs/browser/new-relic-browser/configuration/experimental-features
- title: Summary page
path: /docs/browser/browser-monitoring/getting-started/browser-summary-page
- title: Session replay
Expand All @@ -78,6 +80,8 @@ pages:
path: /docs/browser/new-relic-browser/browser-pro-features/browser-data-distributed-tracing
- title: User actions
path: /docs/browser/browser-monitoring/browser-pro-features/user-actions
- title: Marks and measures
path: /docs/browser/new-relic-browser/browser-pro-features/marks-and-measures
- title: Monitor single page applications (SPA)
pages:
- title: Introduction to SPA monitoring
Expand Down
Loading