Skip to content

Commit 27d0459

Browse files
authored
Merge pull request #7844 from nzamoralopez/docs-editor/troubleshoot-webpages-issues-1733948931
AB#3136: Updating troubleshoot-webpages-issues.md to include common issue regardind '0' page view duration
2 parents b53f557 + 6d3be83 commit 27d0459

1 file changed

Lines changed: 18 additions & 5 deletions

File tree

support/azure/azure-monitor/app-insights/telemetry/troubleshoot-webpages-issues.md

Lines changed: 18 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,22 @@ ms.reviewer: mmcc, toddfous, aaronmax, v-weizhu
99
---
1010
# Troubleshoot Application Insights JavaScript SDK for webpages
1111

12-
The article explains certain issues involving [Application Insights JavaScript SDK for webpages](/azure/azure-monitor/app/javascript) and offers strategies to help fix these issues.
12+
The article explains certain issues that involve [Application Insights JavaScript SDK for webpages](/azure/azure-monitor/app/javascript) and offers strategies to help fix these issues.
1313

14-
## I'm getting an error message of "Failed to get Request-Context correlation header as it may be not included in the response or not accessible"
14+
## I'm seeing a "0" value recorded for page views in Application Insights
1515

16-
The `correlationHeaderExcludedDomains` configuration property is an exclude list that disables correlation headers for specific domains. This option is useful if you include headers that cause the request to fail or not to be sent because of third-party server configuration. This property supports wildcards. Therefore, you can specify a value such as `*.queue.core.windows.net`. Avoid adding the application domain to this property because this stops the SDK from including the required distributed tracing `Request-Id`, `Request-Context`, and `traceparent` headers as part of the request.
16+
This is by design when instrumenting Single Page Applications (SPA). See the following [GitHub issue](https://github.com/microsoft/ApplicationInsights-JS/issues/1139).
17+
18+
Use any of the following workarounds, as appropriate:
19+
20+
- Manually calculate the duration between different route changes in the app, and feed that duration value into the trackPageView() method. See details [here](https://github.com/microsoft/ApplicationInsights-JS/issues/1139#issuecomment-566169033).
21+
- Use the startTrackPageView() and stopTrackPageView() methods as timers to calculate page load durations. See details [here](https://microsoft.github.io/ApplicationInsights-JS/webSdk/applicationinsights-web/classes/ApplicationInsights.html#startTrackPage).
22+
- Use sample app duration measuring for the SPA app. See details [here](https://github.com/microsoft/applicationinsights-react-js?tab=readme-ov-file#example-of-measuring-page-duration-in-an-spa).
23+
- Manually set an overridePageViewDuration value. See details [here](https://github.com/microsoft/ApplicationInsights-JS#:~:text=overridePageViewDuration).
24+
25+
## I'm getting the following error message: "Failed to get Request-Context correlation header as it may be not included in the response or not accessible"
26+
27+
The `correlationHeaderExcludedDomains` configuration property is an exclude list that disables correlation headers for specific domains. This option is useful if you include headers that cause the request to fail or not to be sent because of a third-party server configuration. This property supports wildcards. Therefore, you can specify a value such as `*.queue.core.windows.net`. Avoid adding the application domain to this property because doing this stops the SDK from including the required distributed tracing headers, `Request-Id`, `Request-Context`, and `traceparent`, as part of the request.
1728

1829
## I'm not sure how to update my third-party server configuration
1930

@@ -23,10 +34,12 @@ The server side must be able to accept connections that have certain headers. De
2334

2435
## I'm receiving duplicate telemetry data from the Application Insights JavaScript SDK
2536

26-
If the SDK reports correlation recursively, enable the configuration setting of `excludeRequestFromAutoTrackingPatterns` to exclude the duplicate data. This scenario can occur if you use connection strings. The syntax for the configuration setting is `excludeRequestFromAutoTrackingPatterns: [<endpointUrl>]`.
37+
If the SDK reports correlation recursively, enable the configuration setting of `excludeRequestFromAutoTrackingPatterns` to exclude the duplicate data. This scenario might occur if you use connection strings. The syntax for the configuration setting is `excludeRequestFromAutoTrackingPatterns: [<endpointUrl>]`.
2738

28-
## Connectivity issues occur between your application host and the ingestion service
39+
## I'm experiencing connectivity issues between my application host and the ingestion service
2940

3041
Application Insights SDKs and agents send telemetry to get ingested as REST calls to our ingestion endpoints. To test connectivity from your web server or application host device to the ingestion service endpoints, use raw REST clients from PowerShell or [curl](https://curl.se/docs/manpage.html) commands. For more information, see [Troubleshoot missing application telemetry in Azure Monitor Application Insights](../investigate-missing-telemetry.md).
3142

43+
[!INCLUDE [Third-party disclaimer](../../../../includes/third-party-contact-disclaimer.md)]
44+
3245
[!INCLUDE [Azure Help Support](../../../../includes/azure-help-support.md)]

0 commit comments

Comments
 (0)