天蓝色的哨兵发布跟踪

时间:2021-06-16 11:19:39

标签: .net azure sentry

我正在尝试在哨兵中跟踪托管在 azure 上的 .net5 web-api 的发布,但它不太工作。

在 appsettings.json 中,我有一个定义了发布变量的哨兵部分。

"Sentry": {
"Release": "1.0.2"
... }

作为构建过程的一部分,我在 azure 中添加了一个应用程序设置 enter image description here

但是当在 prod 中记录错误时,哨兵将使用 appsettings 中的值而不是覆盖值进行报告。

enter image description here

我希望天蓝色的设置值覆盖默认配置,但似乎并非如此。我错了吗?还是我做错了什么?

1 个答案:

答案 0 :(得分:2)

在应用设置中将 Sentry.Release 转换为 Sentry__Release

对于 Linux 上的应用服务或容器的 Web 应用,如果您的名称中有嵌套的 json 键结构,例如 ApplicationInsights:InstrumentationKey,则需要将 ApplicationInsights__InstrumentationKey 作为键名。 因此请注意,任何 : 都应替换为 __(即双下划线)。

查看Azure — Configure Application settings and Connection strings in Azure App Services了解更多信息。