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: docs/sourcemaps.rst
+44-5Lines changed: 44 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -152,9 +152,48 @@ Additional information can be found in the `Releases API documentation
152
152
153
153
.. sentry:edition:: hosted
154
154
155
-
Working Behind a Firewall
156
-
-------------------------
155
+
Working Behind a Firewall
156
+
-------------------------
157
157
158
-
While the recommended solution is to upload your source artifacts to
159
-
Sentry, sometimes it's necessary to allow communication from Sentry's
160
-
internal IPs. For more information on Sentry's public IPs, see :ref:`ip-ranges`.
158
+
While the recommended solution is to upload your source artifacts to
159
+
Sentry, sometimes it's necessary to allow communication from Sentry's
160
+
internal IPs. For more information on Sentry's public IPs, see :ref:`ip-ranges`.
161
+
162
+
Troubleshooting
163
+
---------------
164
+
165
+
Source maps can sometimes be tricky to get going. If you're having trouble, try the following tips.
166
+
167
+
Verify sourceMappingURL is present
168
+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
169
+
170
+
Some CDNs automatically strip comments from static files, including JavaScript files. This can have the effect of stripping your JavaScript file of its ``sourceMappingURL`` directive, because it is considered a comment. For example, CloudFlare has a feature called `Auto-Minify
171
+
<https://blog.cloudflare.com/an-all-new-and-improved-autominify/>`_ which will strip ``sourceMappingURL`` if it is enabled.
172
+
173
+
Double-check that your deployed, final JavaScript files have ``sourceMappingURL`` present.
174
+
175
+
Verify artifact names match sourceMappingURL
176
+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
177
+
178
+
When `uploading source maps to Sentry
179
+
<#uploading-source-maps-to-sentry>`_, you must name your source map files with the same name found in ``sourceMappingURL``.
180
+
181
+
__UploadingSourceMapstoSentry
182
+
183
+
For example, if you have the following in a minified application file, ``app.min.js``:
Sentry will look for a matching artifact named exactly ``https://example.com/dist/js/app.min.js.map``.
191
+
192
+
Note also that Sentry will resolve relative paths. For example, if you have the following:
193
+
194
+
.. code-block:: JavaScript
195
+
196
+
// -- end app.min.js (located at https://example.com/dist/js/app.min.js)
197
+
//# sourceMappingURL=app.min.js.map
198
+
199
+
Sentry will resolve ``sourceMappingURL`` relative to ``https://example.com/dist/js/`` (the root path from which ``app.min.js`` was served). You will again need to name your source map with the full URL: ``https://example.com/dist/js/app.min.js.map``.
0 commit comments