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
Copy file name to clipboardExpand all lines: articles/azure-monitor/app/javascript.md
+23-15Lines changed: 23 additions & 15 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -60,17 +60,17 @@ var sdkInstance="appInsightsSDK";window[sdkInstance]="appInsights";var aiName=wi
60
60
By default the Application Insights JavaScript SDK autocollects a number of telemetry items that are helpful in determining the health of your application and the underlying user experience. These include:
61
61
62
62
-**Uncaught exceptions** in your app, including information on
63
-
- Stack trace
64
-
- Exception details and message accompanying the error
65
-
- Line & column number of error
66
-
- URL where error was raised
63
+
- Stack trace
64
+
- Exception details and message accompanying the error
65
+
- Line & column number of error
66
+
- URL where error was raised
67
67
-**Network Dependency Requests** made by your app **XHR** and **Fetch** (fetch collection is disabled by default) requests, include information on
68
-
- Url of dependency source
69
-
- Command & Method used to request the dependency
70
-
- Duration of the request
71
-
- Result code and success status of the request
72
-
- ID (if any) of user making the request
73
-
- Correlation context (if any) where request is made
68
+
- Url of dependency source
69
+
- Command & Method used to request the dependency
70
+
- Duration of the request
71
+
- Result code and success status of the request
72
+
- ID (if any) of user making the request
73
+
- Correlation context (if any) where request is made
74
74
-**User information** (for example, Location, network, IP)
75
75
-**Device information** (for example, Browser, OS, version, language, resolution, model)
76
76
-**Session information**
@@ -91,6 +91,7 @@ appInsights.trackTrace({message: 'This message will use a telemetry initializer'
91
91
appInsights.addTelemetryInitializer(() =>false); // Nothing is sent after this is executed
92
92
appInsights.trackTrace({message: 'this message will not be sent'}); // Not sent
93
93
```
94
+
94
95
## Configuration
95
96
Most configuration fields are named such that they can be defaulted to false. All fields are optional except for `instrumentationKey`.
96
97
@@ -151,7 +152,7 @@ Currently, we offer a separate [React plugin](#react-extensions) which you can i
151
152
152
153
## Explore browser/client-side data
153
154
154
-
Browser/client-side data can be viewed by going to **Metrics** and adding individual metrics you are interested in:
155
+
Browser/client-side data can be viewed by going to **Metrics** and adding individual metrics you are interested in:
155
156
156
157

157
158
@@ -161,15 +162,15 @@ Select **Browser** and then choose **Failures** or **Performance**.
To query your telemetry collected by the JavaScript SDK, select the **View in Logs (Analytics)** button. By adding a `where` statement of `client_Type == "Browser"`, you will only see data from the JavaScript SDK and any server-side telemetry collected by other SDKs will be excluded.
175
176
@@ -190,7 +191,14 @@ dataset
190
191
191
192
### Source Map Support
192
193
193
-
The minified callstack of your exception telemetry can be unminified in the Azure portal. All existing integrations on the Exception Details panel will work with the newly unminified callstack. Drag and drop source map unminifying supports all existing and future JS SDKs (+Node.JS), so you do not need to upgrade your SDK version. To view your unminified callstack,
194
+
The minified callstack of your exception telemetry can be unminified in the Azure portal. All existing integrations on the Exception Details panel will work with the newly unminified callstack.
195
+
196
+
#### Link to Blob storage account
197
+
198
+
You can link your Application Insights resource to your own Azure Blob Storage container to automatically unminify call stacks. To get started, see [automatic source map support](./source-map-support.md).
199
+
200
+
### Drag and drop
201
+
194
202
1. Select an Exception Telemetry item in the Azure portal to view its "End-to-end transaction details"
195
203
2. Identify which source maps correspond to this call stack. The source map must match a stack frame's source file, but suffixed with `.map`
196
204
3. Drag and drop the source maps onto the call stack in the Azure portal
@@ -208,7 +216,7 @@ This version comes with the bare minimum number of features and functionalities
208
216
209
217
For runnable examples, see [Application Insights JavaScript SDK Samples](https://github.com/topics/applicationinsights-js-demo)
210
218
211
-
## Upgrading from the old Version of Application Insights
219
+
## Upgrading from the old version of Application Insights
212
220
213
221
Breaking changes in the SDK V2 version:
214
222
- To allow for better API signatures, some of the API calls, such as trackPageView and trackException, have been updated. Running in Internet Explorer 8 and earlier versions of the browser is not supported.
title: Source map support for JavaScript applications - Azure Monitor Application Insights
3
+
description: Learn how to upload source maps to your own storage account Blob container using Application Insights.
4
+
ms.topic: conceptual
5
+
author: markwolff
6
+
ms.author: marwolff
7
+
ms.date: 03/04/2020
8
+
9
+
---
10
+
11
+
# Source map support for JavaScript applications
12
+
13
+
Application Insights supports the uploading of source maps to your own Storage Account Blob Container.
14
+
Source maps can be used to unminify call stacks found on the end to end transaction details page. Any exception sent by the [JavaScript SDK][ApplicationInsights-JS] or the [Node.js SDK][ApplicationInsights-Node.js] can be unminified with source maps.
15
+
16
+

17
+
18
+
## Create a new storage account and Blob container
19
+
20
+
If you already have an existing storage account or blob container, you can skip this step.
21
+
22
+
1.[Create a new storage account][create storage account]
23
+
2.[Create a blob container][create blob container] inside your storage account. Be sure to set the "Public access level" to `Private`, to ensure that your source maps are not publicly accessible.
24
+
25
+
> [!div class="mx-imgBorder"]
26
+
>
27
+
28
+
## Push your source maps to your Blob container
29
+
30
+
You should integrate your continuous deployment pipeline with your storage account by configuring it to automatically upload your source maps to the configured Blob container. You should not upload your source maps to a subfolder in the Blob container; currently the source map will only be fetched from the root folder.
31
+
32
+
### Upload source maps via Azure Pipelines (recommended)
33
+
34
+
If you are using Azure Pipelines to continuously build and deploy your application, add an [Azure File Copy][azure file copy] task to your pipeline to automatically upload your source maps.
35
+
36
+
> [!div class="mx-imgBorder"]
37
+
> 
38
+
39
+
## Configure your Application Insights resource with a Source Map storage account
40
+
41
+
### From the end-to-end transaction details page
42
+
43
+
From the end-to-end transaction details tab, you can click on *Unminify* and it will display a prompt to configure if your resource is unconfigured.
44
+
45
+
1. In the Portal, view the details of an exception that is minified.
46
+
2. Click on *Unminify*
47
+
3. If your resource has not been configured, a message will appear, prompting you to configure.
48
+
49
+
### From the properties page
50
+
51
+
If you would like to configure or change the storage account or Blob container that is linked to your Application Insights Resource, you can do it by viewing the Application Insights resource's *Properties* tab.
52
+
53
+
1. Navigate to the *Properties* tab of your Application Insights resource.
54
+
2. Click on *Change source map blob container*.
55
+
3. Select a different Blob container as your source maps container.
56
+
4. Click `Apply`.
57
+
58
+
> [!div class="mx-imgBorder"]
59
+
> 
60
+
61
+
## Troubleshooting
62
+
63
+
### Required role-based access control (RBAC) settings on your Blob container
64
+
65
+
Any user on the Portal using this feature must be at least assigned as a [Storage Blob Data Reader][storage blob data reader] to your Blob container. You must assign this role to anyone else that will be using the source maps through this feature.
66
+
67
+
> [!NOTE]
68
+
> Depending on how the container was created, this may not have been automatically assigned to you or your team.
69
+
70
+
### Source map not found
71
+
72
+
1. Verify that the corresponding source map is uploaded to the correct blob container
73
+
2. Verify that the source map file is named after the JavaScript file it maps to, suffixed with `.map`.
74
+
- For example, `/static/js/main.4e2ca5fa.chunk.js` will search for the blob named `main.4e2ca5fa.chunk.js.map`
75
+
3. Check your browser's console to see if any errors are being logged. Include this in any support ticket.
0 commit comments