-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
feat(sourcemaps): Add more sourcemaps docs #6667
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 6 commits
704c5fc
84f9c74
ea737be
37bbb7e
9c9ca83
4327abe
4213a2a
e3c968e
e934c4e
97a8fdc
c6d649a
a6eea1e
3424661
3221912
b4821b8
802c425
078933e
4bb43c8
a171978
75457f1
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
@@ -0,0 +1,63 @@ | ||||||||||||||||||||||||||||||
This article explains the differences between Artifact and Release Bundles, and the implications of using them. Visit [Uploading Source Maps](/platforms/javascript/guides/react/sourcemaps/uploading/) if you're looking for our guides on how to upload source maps. | ||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||
## Introduction | ||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||
Sentry currently supports two methods of uploading sourcemaps: **Release Bundles** and **Artifact Bundles**. A bundle, at a higher level, contains all the minified sources and source maps (known as _artifacts_) required for Sentry to unminify the frames of a stack trace. | ||||||||||||||||||||||||||||||
Jesse-Box marked this conversation as resolved.
Show resolved
Hide resolved
|
||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||
## Release Bundles | ||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||
### What Are They? | ||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||
A release bundle is a bundle format that is connected to an existing `release` in Sentry. For this reason **the creation of a `release` is required** before uploading your artifacts. | ||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||
| Pros | Cons | | ||||||||||||||||||||||||||||||
|:--|:--| | ||||||||||||||||||||||||||||||
| Works with every SDK version | Configuring your build pipeline to upload artifacts can be very challenging | | ||||||||||||||||||||||||||||||
| | Requires your project to use Sentry Releases | ||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||
Jesse-Box marked this conversation as resolved.
Show resolved
Hide resolved
|
||||||||||||||||||||||||||||||
### How Do They Work? | ||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||
``` | ||||||||||||||||||||||||||||||
Diagram Here | ||||||||||||||||||||||||||||||
``` | ||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||
Release Bundles are called like that because they use a `release` as way to index a specific bundle*. The `release` is extracted from the incoming error and used to lookup the most recent bundle. When a bundle is found, we use the absolute path in each frame to find the corresponding minified source in the retrieved bundle. Once the minified source is found, we try to discover its source map with a series of heuristics (e.g., looking at the `sourceURLMapping` comment, using metadata from the uploaded bundle). | ||||||||||||||||||||||||||||||
Jesse-Box marked this conversation as resolved.
Show resolved
Hide resolved
|
||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||
In practice, matching the paths for artifacts discovery is prone to mistmatchs that might be caused by a wrong configuration of your bundler, CI/CD pipeline... | ||||||||||||||||||||||||||||||
Jesse-Box marked this conversation as resolved.
Show resolved
Hide resolved
|
||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||
## Artifact Bundles | ||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||
### What Are They? | ||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||
An artifact bundle is our new bundle format that aims to address the shortcomings of release bundles by **adding the support for Debug IDs** and **removing the need to create a `release`**. | ||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||
| Pros | Cons | | ||||||||||||||||||||||||||||||
|:--|:--| | ||||||||||||||||||||||||||||||
| With the use of Debug IDs, configuring your build pipeline to upload artifacts is trivial | Requires a version update to Javascript SDKs, bundler plugin ( and `sentry-cli`) | | ||||||||||||||||||||||||||||||
| Associating a release is still possible, but not required | May cause problems with integrity checks | ||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||
Jesse-Box marked this conversation as resolved.
Show resolved
Hide resolved
|
||||||||||||||||||||||||||||||
### How Do They Work? | ||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||
``` | ||||||||||||||||||||||||||||||
Diagram Here | ||||||||||||||||||||||||||||||
``` | ||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||
Artifact Bundles solve the challenge of matching paths by using a new identification mechanism known as Debug IDs. Rather than relying on paths we uniquely identify and bind pairs of minified sources and source maps with an Debug ID(UUID). With this, we are able to quickly identify the minified source and corresponding source map without ever needing to check any paths. Thus, you don't have to worry about wrong paths configurations. | ||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||
<Note> | ||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||
If you want to learn more about the rationale behind Debug IDs, we suggest taking a look at our [engineering blog](https://sentry.engineering/blog/the-case-for-debug-ids). | ||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||
</Note> | ||||||||||||||||||||||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||
### Associating a Release with Artifact Bundles | ||||||||||||||||||||||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||
Since you might still want to know to which release a specific artifact bundle is connected to, we designed a new way to still associate a `release` to your bundle. | ||||||||||||||||||||||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||
The new Artifact Bundle format supports a new kind of association to a `release` and optionally `dist`, known as weak release association. This type of association **will not require the creation of a `release`** before uploading sourcemaps and will consequentely allow the creation of a `release` as a separate step down the pipeline. | ||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||
With an associated `release` and optionally `dist` you will be able to quickly go to the Artifact Bundle from your `release` in Sentry, without having to worry about which artifact bundle was used for your errors. | ||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||||||||||||||||||||||||||
## Summary | ||||||||||||||||||||||||||||||
- We recommend you try Artifact Bundles with Debug IDs, if you've failed to upload source maps in the past. | ||||||||||||||||||||||||||||||
- However, we recommend you continue to use Release Bundles if your application already uses them successfully. | ||||||||||||||||||||||||||||||
Jesse-Box marked this conversation as resolved.
Show resolved
Hide resolved
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
--- | ||
title: Artifact vs. Release Bundles | ||
description: "Learn about the differences between artifact bundles and release bundles." | ||
sidebar_order: 6 | ||
--- | ||
|
||
<PlatformContent includePath="sourcemaps/artifact-and-release-bundles" /> |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
--- | ||
title: Validating Files | ||
description: "Learn about Sentry's online validation tool that can be used to test your source maps against your hosted source." | ||
sidebar_order: 6 | ||
sidebar_order: 3 | ||
--- | ||
|
||
<PlatformContent includePath="sourcemaps/validating" /> |
Uh oh!
There was an error while loading. Please reload this page.