自定义Sentry警报内容

huangapple go评论48阅读模式
英文:

Customize Sentry alert content

问题

Sentry 允许在问题达到特定阈值时定义 警报。通过电子邮件传递的警报看起来如下:

来自 <项目> 在 <环境> 的新警报

<问题>

异常
<堆栈跟踪>

<其他信息,例如上下文>

标签
<标签>

现在,堆栈跟踪可能包含敏感数据(例如电子邮件地址),我不希望通过电子邮件共享。如何从警报邮件中移除堆栈跟踪和其他信息?

英文:

Sentry allows to define alerts when issues reach certain thresholds. The alerts that are delivered per Mail look like

New alert from <project> in <environment>

<Issue>

Exception
<stacktrace>

<additional information e.g. contexts>

Tags
<tags>

Now the stacktrace may contain sensitive data (e.g. e-mail addresses) that I do not want to share via mail. How can I remove stacktrace and additional information from the alert mail?

答案1

得分: 1

Sentry 称其为数据清理。

在您的项目设置中,转到“安全与隐私”,在页面底部,您将找到高级数据清理。这是您可以创建规则以满足您的需求,并在信息传递给您之前删除/哈希/替换/遮蔽的地方。更多信息:高级数据清理

以下是一个示例规则,一旦发生错误并且用户的用户名是调试文件的一部分,将删除用户的用户名:

自定义Sentry警报内容

英文:

Sentry calls it data scrubbing.

In your project's settings. Go to Security and Privacy, at the bottom of the page, you'll find Advanced Data Scrubbing. This is where you use can create rules that much your needs and will be removed/hashed/replaced/masked before the information gets to you. For more info : Advanced Data Scrubbing

Here's an example of a rule that removes the username of the user once an error occurs and the username of the user is part of the debugging file :

自定义Sentry警报内容

huangapple
  • 本文由 发表于 2023年2月7日 01:58:54
  • 转载请务必保留本文链接:https://go.coder-hub.com/75364938.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定