You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
# Troubleshoot Application Insights JavaScript SDK for webpages
11
11
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.
13
13
14
14
## I'm seeing a "0" value recorded for page views in Application Insights
15
15
16
-
This is by design when instrumenting Single Page Applications (SPA). See the following GitHub [issue](https://github.com/microsoft/ApplicationInsights-JS/issues/1139).
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
17
18
18
Different workarounds exist:
19
19
20
-
- Manually calculating 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
-
-The methods startTrackPageView() and stopTrackPageView() can also be used as timers to calculate page load durations. See details [here](https://microsoft.github.io/ApplicationInsights-JS/webSdk/applicationinsights-web/classes/ApplicationInsights.html#startTrackPage).
22
-
-Sample app measuring duration for SPA app can be found[here](https://github.com/microsoft/applicationinsights-react-js?tab=readme-ov-file#example-of-measuring-page-duration-in-an-spa).
23
-
-You can set overridePageViewDuration. See details [here](https://github.com/microsoft/ApplicationInsights-JS#:~:text=overridePageViewDuration) to manually set/override duration.
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 measuring duration 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
24
25
-
## 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"
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
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 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.
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.
28
28
29
29
## I'm not sure how to update my third-party server configuration
30
30
@@ -34,10 +34,12 @@ The server side must be able to accept connections that have certain headers. De
34
34
35
35
## I'm receiving duplicate telemetry data from the Application Insights JavaScript SDK
36
36
37
-
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>]`.
38
38
39
-
## 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
40
40
41
41
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).
0 commit comments