根据弹簧轮廓设置哨兵属性

时间:2018-11-08 10:12:25

标签: spring sentry

有什么方法可以根据当前的Spring配置文件为哨兵属性设置不同的值吗?

当前属性位于sentry.properties文件中...

不幸的是,将其命名为application.properties方法(application-profilename.properties)不起作用。因为无法识别sentry-profilename.properties文件中的更改。

所以理想的是:

sentry.properties (base information)
sentry-dev.properties (environment attribute = dev)
sentry-prod.properties (environment attribute = prod)

2 个答案:

答案 0 :(得分:0)

好的,我们将系统变量dev定义为prod Alter VIEW [dbo].[history] as select [objid] ,[interval] ,[value_channel] ,[value_channelid] ,case when [value_text] like '[%]' then right([value text],2) ,[value_raw_text] ,[coverage_raw] from ..... (基于当前的部署管道)。

因此,这解决了我们的问题,并且在sentry.io概述中获得了所需的结果!

答案 1 :(得分:0)

“您可以使用sentry.properties.file Java系统属性或SENTRY_PROPERTIES_FILE系统环境变量来覆盖属性文件的位置。”来自“ https://docs.sentry.io/clients/java/config/#configuration

相关问题