发送更多
Release 与 source map
安装 two API calls in your deploy pipeline
在每个 SDK 中设置 release,然后从流水线告知 Blipit 每次 release 和部署。项目上保存了 GitHub token 后,Blipit 会获取 commit 并在每个问题上标记可疑 commit。上传 source map,浏览器堆栈跟踪就能指向你的源码。
1注册 release
curl https://in.blipit.io/api/v1/releases \
-H "Content-Type: application/json" -H "X-Blipit-Key: <secret key>" \
-d '{"version":"$VERSION","commit":"$GIT_SHA","previous_commit":"$PREVIOUS_SHA","repo":"owner/name"}'2记录部署
curl https://in.blipit.io/api/v1/deploys \
-H "Content-Type: application/json" -H "X-Blipit-Key: <secret key>" \
-d '{"version":"$VERSION","environment":"production","url":"https://example.com"}'3上传 source map
在构建步骤中,使用私密密钥。CLI 会扫描文件夹中的 .map 文件并按 release 上传;文件名是浏览器加载 bundle 的路径。
BLIPIT_KEY=<secret key> npx @blipit/cli sourcemaps upload dist --release "myapp@$GIT_SHA"npx @blipit/cli releases new "myapp@$GIT_SHA" --commit $GIT_SHA --repo owner/name --previous-commit $PREVIOUS_SHA
npx @blipit/cli deploys new "myapp@$GIT_SHA" --env production --url https://example.com须知
- GitHub token 按项目保存在“代码负责人”下;它经过加密,只用于 api.github.com。
遇到问题?发邮件至 support@blipit.io。每个项目的密钥和确切的 DSN 在 app.blipit.io 的“API 密钥”下。

