• /
  • EnglishEspañol日本語한국어Português
  • Log inStart now

Automatically track native marks and measures

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.

Marks and measures 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

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:

    <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

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.

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.

FROM BrowserPerformance SELECT average(entryDuration) WHERE appName = 'My Application' AND entryName = 'mark' OR entryName = 'measure' FACET entryName
Copyright © 2024 New Relic Inc.

This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.