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-sdk-configuration.md
+84-1Lines changed: 84 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -123,6 +123,80 @@ Source map support helps you debug minified JavaScript code with the ability to
123
123
> [!div class="checklist"]
124
124
> - Compatible with all current integrations on the **Exception Details** panel
125
125
> - Supports all current and future JavaScript SDKs, including Node.JS, without the need for an SDK upgrade
126
+
127
+
### Link to Blob Storage account
128
+
129
+
Application Insights supports the uploading of source maps to your Azure Storage account blob container. You can use source maps to unminify call stacks found on the **End-to-end transaction details** page. You can also use source maps to unminify any exception sent by the [JavaScript SDK][ApplicationInsights-JS] or the [Node.js SDK][ApplicationInsights-Node.js].
130
+
131
+

132
+
133
+
## Create a new storage account and blob container
134
+
135
+
If you already have an existing storage account or blob container, you can skip this step.
136
+
137
+
1.[Create a new storage account][create storage account].
138
+
1.[Create a blob container][create blob container] inside your storage account. Set **Public access level** to **Private** to ensure that your source maps aren't publicly accessible.
139
+
140
+
> [!div class="mx-imgBorder"]
141
+
>
142
+
143
+
## Push your source maps to your blob container
144
+
145
+
Integrate your continuous deployment pipeline with your storage account by configuring it to automatically upload your source maps to the configured blob container.
146
+
147
+
You can upload source maps to your Azure Blob Storage container with the same folder structure they were compiled and deployed with. A common use case is to prefix a deployment folder with its version, for example, `1.2.3/static/js/main.js`. When you unminify via an Azure blob container called `sourcemaps`, the pipeline tries to fetch a source map located at `sourcemaps/1.2.3/static/js/main.js.map`.
148
+
149
+
### Upload source maps via Azure Pipelines (recommended)
150
+
151
+
If you're 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.
152
+
153
+
> [!div class="mx-imgBorder"]
154
+
> 
155
+
156
+
## Configure your Application Insights resource with a source map storage account
157
+
158
+
You have two options for configuring your Application Insights resource with a source map storage account.
159
+
160
+
### End-to-end transaction details tab
161
+
162
+
From the **End-to-end transaction details** tab, select **Unminify**. Configure your resource if it's unconfigured.
163
+
164
+
1. In the Azure portal, view the details of an exception that's minified.
165
+
1. Select **Unminify**.
166
+
1. If your resource isn't configured, configure it.
167
+
168
+
### Properties tab
169
+
170
+
To configure or change the storage account or blob container that's linked to your Application Insights resource:
171
+
172
+
1. Go to the **Properties** tab of your Application Insights resource.
173
+
1. Select **Change source map Blob Container**.
174
+
1. Select a different blob container as your source map container.
175
+
1. Select **Apply**.
176
+
177
+
> [!div class="mx-imgBorder"]
178
+
> 
179
+
180
+
## Troubleshooting
181
+
182
+
This section offers troubleshooting tips for common issues.
183
+
184
+
### Required Azure role-based access control settings on your blob container
185
+
186
+
Any user on the portal who uses this feature must be assigned at least as a [Storage Blob Data Reader][storage blob data reader] to your blob container. Assign this role to anyone who might use the source maps through this feature.
187
+
188
+
> [!NOTE]
189
+
> Depending on how the container was created, this role might not have been automatically assigned to you or your team.
190
+
191
+
### Source map not found
192
+
193
+
1. Verify that the corresponding source map is uploaded to the correct blob container.
194
+
1. Verify that the source map file is named after the JavaScript file it maps to and uses the suffix `.map`.
195
+
196
+
For example, `/static/js/main.4e2ca5fa.chunk.js` searches for the blob named `main.4e2ca5fa.chunk.js.map`.
197
+
1. Check your browser's console to see if any errors were logged. Include this information in any support ticket.
198
+
199
+
### View the unminified callstack
126
200
127
201
To view the unminified callstack, select an Exception Telemetry item in the Azure portal, find the source maps that match the call stack, and drag and drop the source maps onto the call stack in the Azure portal. The source map must have the same name as the source file of a stack frame, but with a `map` extension.
128
202
@@ -255,4 +329,13 @@ See the dedicated [troubleshooting article](/troubleshoot/azure/azure-monitor/ap
255
329
256
330
*[Track usage](usage-overview.md)
257
331
*[Custom events and metrics](api-custom-events-metrics.md)
0 commit comments