Skip to content

Commit

Permalink
Merge pull request #18971 from newrelic/daily-release/Oct-15-2024-6_29
Browse files Browse the repository at this point in the history
Daily release/oct 15 2024 6 29
  • Loading branch information
jeff-colucci authored Oct 16, 2024
2 parents 02ca96b + f383c6b commit cd0e974
Show file tree
Hide file tree
Showing 17 changed files with 146 additions and 71 deletions.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -5380,8 +5380,8 @@ Here are assorted other settings available via the agent configuration file.
</Collapser>

<Collapser
id="k8s_operator.enabled"
title="k8s_operator.enabled"
id="NEW_RELIC_K8S_OPERATOR_ENABLED"
title="NEW_RELIC_K8S_OPERATOR_ENABLED"
>
<table>
<tbody>
Expand Down Expand Up @@ -5411,7 +5411,7 @@ Here are assorted other settings available via the agent configuration file.
</th>

<td>
Config file, environment variable
Environment variable
</td>
</tr>

Expand All @@ -5429,7 +5429,61 @@ Here are assorted other settings available via the agent configuration file.

This is an informational setting used to report when the agent is injected into a Kubernetes cluster.
<Callout variant="caution">
This setting does **not** enable/disable this function of the agent.
This setting does **not** enable or disable this function of the agent.
</Callout>
</Collapser>

<Collapser
id="NEW_RELIC_AZURE_OPERATOR_ENABLED"
title="NEW_RELIC_AZURE_OPERATOR_ENABLED"
>
<table>
<tbody>
<tr>
<th>
Type
</th>

<td>
Boolean
</td>
</tr>

<tr>
<th>
Default
</th>

<td>
false
</td>
</tr>

<tr>
<th>
[Set in](#options)
</th>

<td>
Environment variable
</td>
</tr>

<tr>
<th>
[Environ variable](#environment-variables)
</th>

<td>
`NEW_RELIC_AZURE_OPERATOR_ENABLED`
</td>
</tr>
</tbody>
</table>

This is an informational setting used to report when the agent is injected into a Microsoft Azure Container App.
<Callout variant="caution">
This setting does **not** enable or disable this function of the agent.
</Callout>
</Collapser>
</CollapserGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ This can be done through the Azure Portal or the Azure CLI.
3. Jump to "Environment variables" tab and enter the following:
* `NEW_RELIC_APP_NAME`: [desired app name]
* `PYTHONPATH`: `/mnt/instrumentation`
* `NEW_RELIC_K8S_OPERATOR_ENABLED`: `True`
* `NEW_RELIC_AZURE_OPERATOR_ENABLED`: `True`
* `NEW_RELIC_LICENSE_KEY` > Reference a secret > select the secret name from Step 1 (or manually enter the license key)
4. Go to "Volume Mounts" tab and select the volume mount created in Step 2. The mount path should be `/mnt/instrumentation`.
5. Save your changes.
Expand Down Expand Up @@ -137,7 +137,7 @@ This can be done through the Azure Portal or the Azure CLI.

### Add environment variables [#add-env-vars-cli]

`az containerapp update --name $CONTAINER_APP_NAME --resource-group $RESOURCE_GROUP --set-env-vars "NEW_RELIC_APP_NAME=$NEW_RELIC_APP_NAME" "NEW_RELIC_K8S_OPERATOR_ENABLED=True" "NEW_RELIC_LICENSE_KEY=secretref:license-key" "PYTHONPATH="/mnt/instrumentation`
`az containerapp update --name $CONTAINER_APP_NAME --resource-group $RESOURCE_GROUP --set-env-vars "NEW_RELIC_APP_NAME=$NEW_RELIC_APP_NAME" "NEW_RELIC_AZURE_OPERATOR_ENABLED=True" "NEW_RELIC_LICENSE_KEY=secretref:license-key" "PYTHONPATH="/mnt/instrumentation`

</Step>
<Step>
Expand Down Expand Up @@ -252,7 +252,7 @@ This can be done through the Azure Portal or the Azure CLI:
* `NEW_RELIC_APP_NAME`: Your Linux Azure website name
* `NEW_RELIC_LICENSE_KEY`: Your New Relic <InlinePopover type="licenseKey" />
* `PYTHONPATH`: `/home:/home/workspace/newrelic`
* `NEW_RELIC_K8S_OPERATOR_ENABLED`: `True`
* `NEW_RELIC_AZURE_OPERATOR_ENABLED`: `True`
3. Save your settings.

If a specific agent version is desired, add the `AGENT_VERSION` environment variable with the version number, prepended by `v` (e.g. `v10.0.0`).
Expand Down Expand Up @@ -283,7 +283,7 @@ This can be done through the Azure Portal or the Azure CLI:
</Step>
<Step>
### Add necessary environment variables
`az webapp config appsettings set --name ${WEB_APP_NAME} --resource-group ${RESOURCE_GROUP} --settings NEW_RELIC_LICENSE_KEY=$NEW_RELIC_LICENSE_KEY NEW_RELIC_K8S_OPERATOR_ENABLED=true NEW_RELIC_APP_NAME="Azure Service App" PYTHONPATH="/home:/home/workspace/newrelic"`
`az webapp config appsettings set --name ${WEB_APP_NAME} --resource-group ${RESOURCE_GROUP} --settings NEW_RELIC_LICENSE_KEY=$NEW_RELIC_LICENSE_KEY NEW_RELIC_AZURE_OPERATOR_ENABLED=true NEW_RELIC_APP_NAME="Azure Service App" PYTHONPATH="/home:/home/workspace/newrelic"`

If a specific agent version is desired, add the `AGENT_VERSION` environment variable with the version number, prepended by `v` (e.g. `v10.0.0`) as shown in the example below:

Expand All @@ -301,7 +301,7 @@ This can be done through the Azure Portal or the Azure CLI:

</CollapserGroup>

## Troubleshooting [#troubleshooting]
### Troubleshooting [#troubleshooting]

In some cases, telemetry may not be available, or that the `prebuild.sh` script may cause the existing application to fail re-deployment. To remedy this, enable these environment variables:

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,13 @@ freshnessValidatedDate: never

## Problem

If you have just configured your application with <InlinePopover type="browser"/>, wait a few minutes for data to appear. If you have already waited a few minutes and you still do not see any data, try these troubleshooting tips. Some of these tips depend on whether you [deployed your app](/docs/browser/new-relic-browser/getting-started/adding-apps-new-relic-browser) by allowing browser monitoring to automatically insert the JavaScript snippet into your APM-monitored app or by inserting the JavaScript snippet yourself.
If you have just configured your application with <InlinePopover type="browser"/>, wait a few minutes for data to appear. If you have already waited a few minutes and you still do not see any data, try these troubleshooting tips. Some of these tips depend on whether you [deployed your app](/docs/browser/new-relic-browser/getting-started/adding-apps-new-relic-browser) by allowing browser monitoring to automatically insert the JavaScript snippet into your APM-monitored app or by inserting the JavaScript snippet through direct placement or the NPM package.

## Solution

Recommendation: Before following specific troubleshooting procedures, run the [Diagnostics browser checks](/docs/agents/manage-apm-agents/troubleshooting/new-relic-diagnostics). Once Diagnostics CLI is downloaded, target the browser checks by running the command-line options: `/nrdiag -browser-url YOUR-WEBSITE-URL -suites browser`. The information returned from Diagnostics CLI can be used when communicating with New Relic Support.
Recommendation: Once Diagnostics CLI is downloaded, target the browser checks by running the command-line options: `/nrdiag -browser-url YOUR-WEBSITE-URL -suites browser`. The information returned from Diagnostics CLI can be used when communicating with New Relic Support.

If your browser monitoring agent was deployed for an account monitored with an <InlinePopover type="apm"/> agent, see [APM deployments](#apm-tips). If your browser monitoring agent was deployed using the JavaScript copy/paste method, see [Copy/paste deployment](#manual-tips). If you are unsure which you have, the Diagnostics tool will return the deployment method.
If your browser monitoring agent was deployed for an account monitored with an <InlinePopover type="apm"/> agent, see [APM deployments](#apm-tips). If your browser monitoring agent was deployed using the JavaScript copy/paste method, see [Copy/paste deployment](#manual-tips). Installations via NPM will require self-troubleshooting as that depends and varies based on your project build and bundler. If you are unsure which you have, the Diagnostics tool will return the deployment method.

You can also troubleshoot situations where you are missing only [AJAX](/docs/browser/new-relic-browser/troubleshooting/troubleshooting-ajax-data-collection) or [session trace](/docs/browser/new-relic-browser/troubleshooting/troubleshooting-session-trace-collection) data.

Expand Down Expand Up @@ -69,30 +69,12 @@ These troubleshooting steps apply to problems when the browser monitoring agent

```html
<script type="text/javascript">
(window.NREUM||(NREUM={})).loader_config={xpid:"VRUGVVJS";window.NREUM||(NREUM={}),__nr_require=function a(b,c,d){ ...
;window.NREUM||(NREUM={});NREUM.init={ ...
```
OR like this:
Also verify that a line like this exists somewhere in the HTML:
```html
<script type="text/javascript">
window.NREUM||(NREUM={}),__nr_require=function a (b,c,d){ ...
```
Also verify that a second script element exists in one of two locations, depending on the app server agent language.
* <DNT>**Go**</DNT>: n/a
* <DNT>**Java**</DNT>: Before the `</body>` tag (which must be added to the page if missing)
* <DNT>**.NET**</DNT>: Immediately before the first script element
* <DNT>**Node.js**</DNT>: Immediately before the first script element
* <DNT>**PHP**</DNT>: At the end of the body element
* <DNT>**Python**</DNT>: In the head element or at the end of the body element
* <DNT>**Ruby**</DNT>: Immediately before the first script element
The second tag contains configuration and timing data, and looks like this:
```html
<script type="text/javascript">
window.NREUM||(NREUM={});NREUM.info={"beacon":"bam.nr-data.net","errorBeacon":"bam.nr-data.net"...
```
Expand Down Expand Up @@ -191,7 +173,7 @@ These troubleshooting steps apply to problems when New Relic's browser monitorin
```html
<script type="text/javascript">
window.NREUM||(NREUM={}),__nr_require=function a (b,c,d){ ...
;window.NREUM||(NREUM={});NREUM.init={ ...
```
If the script element is missing, make sure that you have pasted it in and deployed your new code. If you have not yet pasted in the JavaScript snippet, you can copy it again from your browser app's [<DNT>**Settings**</DNT> page](/docs/browser/new-relic-browser/installation-configuration/browser-settings-ui-options-browser-monitoring). If applicable, restart the application serving these pages.
Expand Down Expand Up @@ -229,7 +211,7 @@ These troubleshooting steps apply to problems when New Relic's browser monitorin
</html>
```
If the Javascript is correctly placed, compare it with the original snippet you generated to ensure it is complete and identical. Incomplete or modified snippets may not report correctly.
If the Javascript is correctly placed, compare the final HTML served to your users with the original pasted snippet to ensure it's complete and identical. Incomplete or modified snippets may not report correctly. This could happen with frameworks that try to sanitize or alter raw javascript rendered without using the appropriate method.
</Collapser>
<Collapser
Expand All @@ -243,7 +225,7 @@ These troubleshooting steps apply to problems when New Relic's browser monitorin
id="manual_network_access"
title="Verify end-user network access"
>
If your application is loaded primarily within a secured local network, ensure that your users can reach the necessary network endpoints to report browser data. This includes New Relic's [CDNs and beacon](/docs/browser/new-relic-browser/performance-quality/security-new-relic-browser#cdn).
If your application is loaded primarily within a secured local network, ensure that your users can reach the necessary network endpoints to report browser data. This includes New Relic's [CDNs and beacon](/docs/browser/new-relic-browser/performance-quality/security-new-relic-browser#traces).
</Collapser>
<Collapser
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -78,3 +78,7 @@ Some common reasons that this can occur are:
Your New Relic weekly performance report includes the number of page views. This is the total number of page loads that we have recorded over the time period. After an end user's browser loads a page that includes page load timing, the JavaScript loads and reports its timing data. If the user navigates away from the page before the JavaScript executes, data is not sent for that page, and it is not included in the total page views report.
</Collapser>
</CollapserGroup>

### Ad blockers

Ad blockers, either as a browser extension or plug-in or installed through their private DNS or router, will prevent the agent from loading and capturing page views. The only workaround to this is to use a [reverse proxy when fetching the agent code and sending data](/docs/browser/new-relic-browser/configuration/proxy-agent-requests/).
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,11 @@ Follow these troubleshooting steps for browser monitoring:

1. Check whether browser monitoring is properly installed in all of your application's pages.
2. If the JavaScript snippets are missing, or if users are unable to send data to New Relic, follow the steps for [troubleshooting browser monitoring installation](/docs/browser/new-relic-browser/installation-configuration/troubleshooting-browser-monitoring-installation).
3. If you have a single-page style application and are expecting to see your route changes as views, consider using [browser SPA monitoring](/docs/browser/single-page-app-monitoring/get-started/welcome-single-page-app-monitoring), which provides an integrated view of initial page loads and route changes.
3. If you have a single-page style application and are expecting to see your route changes as views, consider using [browser SPA monitoring](/docs/browser/single-page-app-monitoring/get-started/welcome-single-page-app-monitoring), which provides an integrated view of both initial page loads and route changes.

If browser monitoring is working properly, you may be seeing different results because New Relic collects and presents information differently from other analytics tools. For more information about how we collects data, see:
If browser monitoring is working properly, you may be seeing different results because New Relic collects and presents information differently from other analytics tools. For instance, `JavascriptErrors` and `AjaxRequest` are individually monitored and their data depends on when our agent observes them and what we can or decide to capture. For `BrowserInteraction`, we use our own custom instrumentation, and for vitals and metrics under `PageViewTiming` and `PageView`, the web-vitals library owned by Chrome team is the source of that data.

For more information on how we collect data, see:

* [Page load timing process](/docs/browser/new-relic-browser/page-load-timing-resources/page-load-timing-process)
* [Instrumentation for browser monitoring](/docs/browser/new-relic-browser/page-load-timing-resources/instrumentation-browser-monitoring)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ Our <InlinePopover type="browser"/> is inserting its JavaScript instrumentation

## Solution

New Relic agents attempt to inject the JavaScript in the optimum location, but if you encounter problems, try these troubleshooting steps.
New Relic agents attempt to inject the JavaScript in the best location, but if you encounter problems, try these troubleshooting steps.

1. Verify whether browser monitoring is the cause by [disabling browser monitoring](/docs/browser/new-relic-browser/installation/disable-browser-monitoring/).
2. If disabling browser monitoring solves the problem, investigate the source code for the page. Re-enable browser monitoring and check for the following possible issues:
Expand All @@ -25,4 +25,5 @@ New Relic agents attempt to inject the JavaScript in the optimum location, but i
* Occurrence of any `<head>` or `<body>` tags within the page's JavaScript.
* Use [http://validator.w3.org](http://validator.w3.org) to verify your page source, and check for serious markup validity issues or character encoding issues.
3. Eliminate any conflicts you find by revising the page structure, [disabling browser monitoring for that page,](/docs/browser/new-relic-browser/installation-configuration/disable-browser-monitoring-specific-pages) or switching to [manually instrumenting via agent API](/docs/browser/new-relic-browser/installation-configuration/browser-settings-ui-options-browser-monitoring#agent-instrumentation) for full control over script injection.
4. If you encounter other situations, contact [New Relic Support](https://support.newrelic.com/) and provide an accessible link to your page or the source code for it. Ensure browser monitoring is enabled in your link or source code.
4. Review our [compatibility list](/docs/browser/new-relic-browser/getting-started/compatibility-requirements-browser-monitoring/#frameworks-and-libraries) for known conflicts with other libraries that your site may be using.
5. If you encounter other situations, contact [New Relic Support](https://support.newrelic.com/) and provide an accessible link to your page or the source code for it. Ensure browser monitoring is enabled in your link or source code.
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,10 @@ When recording the HAR file, use features on your site to generate the appropria
>
Google Chrome browsers come with the ability to generate a HAR file. Depending on your browser version, the path names may vary to open the console.

<Callout variant="tip">
Before collecting the HAR file, please make sure the browser agent is actively running and installed on the app page.
</Callout>

1. From the Chrome menu (top right) , select <DNT>**Tools > Developer tools**</DNT> or <DNT>**More tools > Developer tools**</DNT> as applicable.
2. From the console, select <DNT>**Network**</DNT>.
3. Select the record icon.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,10 @@ freshnessValidatedDate: never

JavaScript (JS) error events are compiled on the [<InlinePopover type="browser"/> JS errors page](/docs/browser/new-relic-browser/browser-pro-features/javascript-errors-page-examining-errors-over-time). By default, they're grouped by error message. When you select a single error event, you'll see more detail in its <DNT>**Error Instances**</DNT> list. In some cases, one or more of the instances may not have a stack trace.

<Callout variant="tip">
Instead, you'll see the message, "<DNT>**This error is likely coming from a third-party site and no stack trace is available**</DNT>."
</Callout>

## Solution

First, see if you're able to reproduce the error on your site, and if so, verify that it shows a stack trace on your dev console or web inspector when it's open before the error occurs.

Enabling cross-origin resource sharing (CORS) can eliminate this issue, exposing the full details of the JS error to your application and allowing the error's stack trace to be captured by the browser agent.

There are many online resources that provide information on CORS enabling and settings. This MDN article has a [detailed description of CORS](https://developer.mozilla.org/en-US/docs/Web/HTTP/CORS), with a section on [configuring response headers](https://developer.mozilla.org/en-US/docs/Web/HTTP/CORS#The_HTTP_response_headers), and another on [CORS settings attributes](https://developer.mozilla.org/en-US/docs/Web/HTML/CORS_settings_attributes). The Enable CORS website has information [how to enable CORS for various platforms](http://enable-cors.org/server.html).
Expand Down
Loading

0 comments on commit cd0e974

Please sign in to comment.