releases 还用于将 source maps 应用到压缩的 JavaScript 中

告诉 SDK 将事件发送到哪里。如果没有提供这个值,SDK 将尝试从 SENTRY_DSN 环境变量中读取它。如果这个变量也不存在,SDK 就不会发送任何事件。

在没有进程环境(如浏览器)的运行时中,fallback 不会应用。

debug

打开或关闭调试模式。如果启用了调试,如果发送事件时出现问题,SDK 将尝试打印出有用的调试信息。默认值总是 false。一般不建议在生产环境中打开它,尽管打开 debug 模式不会引起任何安全问题。

release

设置 release(发行版)。某些 SDK 会尝试自动配置 release,但是最好手动设置 release,以确保该 release 与您的 deploy integrations 或 source map uploads 同步。版本名称是字符串,但是 Sentry 会检测到某些格式,并且它们的呈现方式可能有所不同。在 releases 文档中了解有关如何发送 release 数据的更多信息,以便 Sentry 可以告诉您 release 之间的回归并确定潜在的来源。

默认情况下,SDK 会尝试从环境变量 SENTRY_RELEASE 中读取该值(在浏览器 SDK 中,将从 window.SENTRY_RELEASE 中读取该值,如果可用)。

environment

设置环境。此字符串为自由形式,默认情况下不设置。一个 release 可以与多个环境相关联,以便在 UI 中将它们分开(可以考虑staging 与 prod 或类似的方式)。

默认情况下,SDK 将尝试从 SENTRY_ENVIRONMENT 环境变量中读取该值(浏览器 SDK 除外)。

sampleRate

配置错误事件的采样率,范围为 0.0 到 1.0。默认值为 1.0,表示发送了 100% 的错误事件。如果设置为 0.1,则仅发送 10% 的错误事件。事件是随机选择的。

maxBreadcrumbs

这个变量控制应该捕获的面包屑( breadcrumbs )总数。默认值为 100。

attachStacktrace

当启用时,堆栈跟踪将自动附加到所有记录的消息。堆栈跟踪总是附加到异常;然而,当设置此选项时,堆栈跟踪也会与消息一起发送。例如,该选项意味着堆栈跟踪显示在所有日志消息的旁边。

该选项默认为 off。

对于有堆栈跟踪和没有堆栈跟踪的事件,Sentry中的分组是不同的。结果,在为某些事件启用或禁用此 flag 时,您将获得新的组。

sendDefaultPii

如果启用此 flag,则某些个人识别信息(PII)将由 active integrations 添加。默认情况下,不发送此类数据。如果可能的话,我们建议默认情况下启用此功能以发送所有此类数据,并使用管理 敏感数据 的功能手动删除您不想发送的内容。

denyUrls

与不应该发送到 Sentry 的错误 URL 相匹配的字符串或正则表达式模式列表。默认情况下,将发送所有错误。这是一个 “contains(包含)” 匹配整个文件 URL。因此,如果你添加 foo.com,它也会匹配 https://bar.com/myfile/foo.com。默认情况下,将发送所有错误。

allowUrls

匹配错误 URL 的字符串列表或正则表达式模式的遗留别名,这些错误 URL 应该专门发送给 Sentry。默认情况下,将发送所有错误。这是一个 “contains(包含)” 匹配整个文件 URL。因此,如果您将 foo.com 添加到它,它也将匹配 https://bar.com/myfile/foo.com。默认情况下,所有错误将被发送。

autoSessionTracking

当设置为 true 时,SDK 将发送 session 事件给 Sentry。所有浏览器 SDK 都支持这一点,每个页面加载都向 Sentry 发送一个 session。

normalizeDepth

Sentry SDK 将任何上下文数据标准化到给定深度。任何包含比其更深的结构的数据的 key 都将被修剪并使用其类型([Object] 或 [Array])进行标记,而无需进一步进行操作。默认情况下,walking 的深度为 3 级。

Integration Configuration
对于许多平台,SDK 集成可以与之一起配置。在一些平台上,这是 init() 调用的一部分,而在另一些平台上,则应用不同的模式。

integrations

在一些 SDK 中,在库初始化时通过这个参数配置集成。要了解更多信息,请参阅我们的文档了解特定的集成。

defaultIntegrations

这可以用来禁用默认添加的集成。当设置为 false 时,不会添加默认的集成。

Hooks
这些选项可用于以各种方式 hook SDK,以定制事件的报告。

beforeSend

使用 SDK-specific 事件对象调用此函数,可以返回修改后的事件对象或不返回任何内容,以跳过报告事件。例如,这可以用于在发送前手动剥离 PII。

beforeBreadcrumb

在将面包屑(breadcrumb)添加到作用域(scope)之前,使用 SDK 特定的面包屑(SDK-specific breadcrumb)对象调用此函数。当该函数未返回任何内容时,将删除 breadcrumb。要传递 breadcrumb,请返回第一个参数,其中包含 breadcrumb 对象。回调通常会获得第二个参数(称为“hint”),该参数包含创建 breadcrumb 的原始对象,以进一步自定义面包屑的外观。

Transport Options
Transports 被用来发送事件到 Sentry。可以在某种程度上对传输进行定制,以更好地支持高度特定的部署。

transport

切换出用于发送事件的 transport。如何运作取决于 SDK。例如,它可以用于捕获事件以进行单元测试,或通过需要代理身份验证的更复杂的设置发送事件。

Tracing Options
tracesSampleRate

0 到 1 之间的数字,控制给定事务发送到哨兵的概率百分比。(0表示0%,1表示100%)同样适用于应用程序中创建的所有事务。必须定义这个或 tracesSampler 以启用跟踪。

tracesSampler

一个函数负责确定一个给定的事务将被发送到 Sentry 的概率百分比。它将自动被传递有关事务和创建它的上下文的信息,并且必须返回一个介于 0(被发送的概率为0%)和 1(被发送的概率为100%) 之间的数字。还可以用于过滤事务,对不需要的事务返回0。必须定义这个或 tracesSampleRate 来启用跟踪。

Releases & Health
一个 release 是部署到环境中的代码版本。当您向 Sentry 提供有关 release 的信息时,您可以:

确定新版本中引入的问题和回归
预测哪个提交引起了问题,谁可能负责
通过在提交消息中包含问题编号来解决问题
在部署代码时接收电子邮件通知
此外,releases 还用于将 source maps 应用到压缩的 JavaScript 中,以查看原始的、未转换的源代码。

Bind the Version
在配置客户端 SDK 时包含一个 release ID(通常称为 “version” )。这个 ID 通常是一个 git SHA 或自定义版本号。

release 名称不能:

包含换行符或空格
使用正斜杠(/),反斜杠(),句点(.),或双句点(…)
超过 200 个字符
每个组织的发布是全局的;在它们前面加上一些特定于项目(project-specific)的东西,以方便区分。告诉 SDK 将事件发送到哪里。如果没有提供这个值,SDK 将尝试从 SENTRY_DSN 环境变量中读取它。如果这个变量也不存在,SDK 就不会发送任何事件。

在没有进程环境(如浏览器)的运行时中,fallback 不会应用。

debug

打开或关闭调试模式。如果启用了调试,如果发送事件时出现问题,SDK 将尝试打印出有用的调试信息。默认值总是 false。一般不建议在生产环境中打开它,尽管打开 debug 模式不会引起任何安全问题。

release

设置 release(发行版)。某些 SDK 会尝试自动配置 release,但是最好手动设置 release,以确保该 release 与您的 deploy integrations 或 source map uploads 同步。版本名称是字符串,但是 Sentry 会检测到某些格式,并且它们的呈现方式可能有所不同。在 releases 文档中了解有关如何发送 release 数据的更多信息,以便 Sentry 可以告诉您 release 之间的回归并确定潜在的来源。
https://github.com/saom1084/crsafmlfuk/discussions/2173
https://github.com/feax844/vviwssuakm/discussions/2162
https://github.com/ogo79152/hfzqsnpyhc/discussions/2171
https://github.com/pxdo380/enycvtgupf/discussions/2156
https://github.com/saom1084/crsafmlfuk/discussions/2174
https://github.com/ogo79152/hfzqsnpyhc/discussions/2172
https://github.com/feax844/vviwssuakm/discussions/2163
https://github.com/pxdo380/enycvtgupf/discussions/2157
https://github.com/saom1084/crsafmlfuk/discussions/2175
https://github.com/feax844/vviwssuakm/discussions/2164
https://github.com/ogo79152/hfzqsnpyhc/discussions/2173
https://github.com/saom1084/crsafmlfuk/discussions/2176
https://github.com/pxdo380/enycvtgupf/discussions/2158
https://github.com/feax844/vviwssuakm/discussions/2165
https://github.com/ogo79152/hfzqsnpyhc/discussions/2174
https://github.com/saom1084/crsafmlfuk/discussions/2177
https://github.com/pxdo380/enycvtgupf/discussions/2159
https://github.com/feax844/vviwssuakm/discussions/2166
https://github.com/ogo79152/hfzqsnpyhc/discussions/2175
https://github.com/pxdo380/enycvtgupf/discussions/2160
https://github.com/saom1084/crsafmlfuk/discussions/2178
https://github.com/feax844/vviwssuakm/discussions/2167
https://github.com/ogo79152/hfzqsnpyhc/discussions/2176
https://github.com/saom1084/crsafmlfuk/discussions/2179
https://github.com/pxdo380/enycvtgupf/discussions/2161
https://github.com/feax844/vviwssuakm/discussions/2168
https://github.com/saom1084/crsafmlfuk/discussions/2180
https://github.com/ogo79152/hfzqsnpyhc/discussions/2177
https://github.com/pxdo380/enycvtgupf/discussions/2162
https://github.com/feax844/vviwssuakm/discussions/2169
https://github.com/ogo79152/hfzqsnpyhc/discussions/2178
https://github.com/saom1084/crsafmlfuk/discussions/2181
https://github.com/feax844/vviwssuakm/discussions/2170
https://github.com/pxdo380/enycvtgupf/discussions/2163
https://github.com/saom1084/crsafmlfuk/discussions/2182
https://github.com/ogo79152/hfzqsnpyhc/discussions/2179
https://github.com/feax844/vviwssuakm/discussions/2171
https://github.com/pxdo380/enycvtgupf/discussions/2164
https://github.com/saom1084/crsafmlfuk/discussions/2183
https://github.com/ogo79152/hfzqsnpyhc/discussions/2180
https://github.com/feax844/vviwssuakm/discussions/2172
https://github.com/pxdo380/enycvtgupf/discussions/2165
https://github.com/saom1084/crsafmlfuk/discussions/2184
https://github.com/ogo79152/hfzqsnpyhc/discussions/2181
https://github.com/feax844/vviwssuakm/discussions/2173
https://github.com/pxdo380/enycvtgupf/discussions/2166
https://github.com/ogo79152/hfzqsnpyhc/discussions/2182
https://github.com/saom1084/crsafmlfuk/discussions/2185
https://github.com/feax844/vviwssuakm/discussions/2174
https://github.com/pxdo380/enycvtgupf/discussions/2167
https://github.com/saom1084/crsafmlfuk/discussions/2186
https://github.com/ogo79152/hfzqsnpyhc/discussions/2183
https://github.com/pxdo380/enycvtgupf/discussions/2168
https://github.com/feax844/vviwssuakm/discussions/2175
https://github.com/saom1084/crsafmlfuk/discussions/2187
https://github.com/ogo79152/hfzqsnpyhc/discussions/2184
https://github.com/pxdo380/enycvtgupf/discussions/2169
https://github.com/feax844/vviwssuakm/discussions/2176
https://github.com/saom1084/crsafmlfuk/discussions/2188
https://github.com/ogo79152/hfzqsnpyhc/discussions/2185
https://github.com/pxdo380/enycvtgupf/discussions/2170
https://github.com/feax844/vviwssuakm/discussions/2177
https://github.com/ogo79152/hfzqsnpyhc/discussions/2186
https://github.com/saom1084/crsafmlfuk/discussions/2189
https://github.com/pxdo380/enycvtgupf/discussions/2171
https://github.com/feax844/vviwssuakm/discussions/2178
https://github.com/ogo79152/hfzqsnpyhc/discussions/2187
https://github.com/pxdo380/enycvtgupf/discussions/2172
https://github.com/saom1084/crsafmlfuk/discussions/2190
https://github.com/feax844/vviwssuakm/discussions/2179
https://github.com/ogo79152/hfzqsnpyhc/discussions/2188
https://github.com/saom1084/crsafmlfuk/discussions/2191
https://github.com/pxdo380/enycvtgupf/discussions/2173
https://github.com/feax844/vviwssuakm/discussions/2180
https://github.com/ogo79152/hfzqsnpyhc/discussions/2189
https://github.com/saom1084/crsafmlfuk/discussions/2192
https://github.com/pxdo380/enycvtgupf/discussions/2174
https://github.com/feax844/vviwssuakm/discussions/2181
https://github.com/ogo79152/hfzqsnpyhc/discussions/2190
https://github.com/saom1084/crsafmlfuk/discussions/2193
https://github.com/pxdo380/enycvtgupf/discussions/2175
https://github.com/feax844/vviwssuakm/discussions/2182
https://github.com/ogo79152/hfzqsnpyhc/discussions/2191
https://github.com/saom1084/crsafmlfuk/discussions/2194
https://github.com/pxdo380/enycvtgupf/discussions/2176
https://github.com/feax844/vviwssuakm/discussions/2183
https://github.com/ogo79152/hfzqsnpyhc/discussions/2192
https://github.com/saom1084/crsafmlfuk/discussions/2195
https://github.com/pxdo380/enycvtgupf/discussions/2177
https://github.com/feax844/vviwssuakm/discussions/2184
https://github.com/ogo79152/hfzqsnpyhc/discussions/2193
https://github.com/saom1084/crsafmlfuk/discussions/2196
https://github.com/feax844/vviwssuakm/discussions/2185
https://github.com/pxdo380/enycvtgupf/discussions/2178
https://github.com/ogo79152/hfzqsnpyhc/discussions/2194
https://github.com/saom1084/crsafmlfuk/discussions/2197
https://github.com/pxdo380/enycvtgupf/discussions/2179
https://github.com/feax844/vviwssuakm/discussions/2186
https://github.com/ogo79152/hfzqsnpyhc/discussions/2195
https://github.com/saom1084/crsafmlfuk/discussions/2198
https://github.com/ogo79152/hfzqsnpyhc/discussions/2196
https://github.com/pxdo380/enycvtgupf/discussions/2180
https://github.com/feax844/vviwssuakm/discussions/2187
https://github.com/saom1084/crsafmlfuk/discussions/2199
https://github.com/pxdo380/enycvtgupf/discussions/2181
https://github.com/ogo79152/hfzqsnpyhc/discussions/2197
https://github.com/feax844/vviwssuakm/discussions/2188
https://github.com/saom1084/crsafmlfuk/discussions/2200
https://github.com/ogo79152/hfzqsnpyhc/discussions/2198
https://github.com/pxdo380/enycvtgupf/discussions/2182
https://github.com/saom1084/crsafmlfuk/discussions/2201
https://github.com/feax844/vviwssuakm/discussions/2189
https://github.com/ogo79152/hfzqsnpyhc/discussions/2199
https://github.com/pxdo380/enycvtgupf/discussions/2183
https://github.com/saom1084/crsafmlfuk/discussions/2202
https://github.com/feax844/vviwssuakm/discussions/2190
https://github.com/pxdo380/enycvtgupf

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 2
    评论
评论 2
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值