- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我是 Sentry 的新手,关注 this
并按照相同的步骤和代码我有一个 sbt 项目,我在其中创建了 sentry.properties
文件,其内容是
dsn=https://public:private@host:port/1
并在抛出异常后运行代码时将其放置在 src/main/resources
下(与上面链接给出的代码相同)'
18:19:26.745 [run-main-1] DEBUG io.sentry.config.Lookup - Found dsn=https://public:private@host:port/1 in sentry.properties.
18:19:26.754 [run-main-1] ERROR io.sentry.SentryClientFactory - Error creating valid DSN from: 'https://public:private@host:port/1'.
io.sentry.dsn.InvalidDsnException: Invalid DSN, the following properties aren't set '[host, public key]'
at io.sentry.dsn.Dsn.validate(Dsn.java:209) ~[sentry-1.7.16.jar:na]
at io.sentry.dsn.Dsn.<init>(Dsn.java:66) ~[sentry-1.7.16.jar:na]
at io.sentry.dsn.Dsn.<init>(Dsn.java:41) ~[sentry-1.7.16.jar:na]
at io.sentry.SentryClientFactory.resolveDsn(SentryClientFactory.java:73) [sentry-1.7.16.jar:na]
at io.sentry.SentryClientFactory.sentryClient(SentryClientFactory.java:42) [sentry-1.7.16.jar:na]
at io.sentry.Sentry.init(Sentry.java:81) [sentry-1.7.16.jar:na]
at io.sentry.Sentry.init(Sentry.java:44) [sentry-1.7.16.jar:na]
at sentry.SentryDemo$.main(SentryDemo.scala:16) [classes/:na]
at sentry.SentryDemo.main(SentryDemo.scala) [classes/:na]
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_181]
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:1.8.0_181]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_181]
at java.lang.reflect.Method.invoke(Method.java:498) ~[na:1.8.0_181]
at sbt.Run.invokeMain(Run.scala:67) [run-0.13.16.jar:0.13.16]
at sbt.Run.run0(Run.scala:61) [run-0.13.16.jar:0.13.16]
at sbt.Run.sbt$Run$$execute$1(Run.scala:51) [run-0.13.16.jar:0.13.16]
at sbt.Run$$anonfun$run$1.apply$mcV$sp(Run.scala:55) [run-0.13.16.jar:0.13.16]
at sbt.Run$$anonfun$run$1.apply(Run.scala:55) [run-0.13.16.jar:0.13.16]
at sbt.Run$$anonfun$run$1.apply(Run.scala:55) [run-0.13.16.jar:0.13.16]
at sbt.Logger$$anon$4.apply(Logger.scala:84) [logging-0.13.16.jar:0.13.16]
at sbt.TrapExit$App.run(TrapExit.scala:248) [run-0.13.16.jar:0.13.16]
at java.lang.Thread.run(Thread.java:748) [na:1.8.0_181]
[error] (run-main-1) io.sentry.dsn.InvalidDsnException: Invalid DSN, the following properties aren't set '[host, public key]'
io.sentry.dsn.InvalidDsnException: Invalid DSN, the following properties aren't set '[host, public key]'
at io.sentry.dsn.Dsn.validate(Dsn.java:209)
at io.sentry.dsn.Dsn.<init>(Dsn.java:66)
at io.sentry.dsn.Dsn.<init>(Dsn.java:41)
at io.sentry.SentryClientFactory.resolveDsn(SentryClientFactory.java:73)
at io.sentry.SentryClientFactory.sentryClient(SentryClientFactory.java:42)
at io.sentry.Sentry.init(Sentry.java:81)
at io.sentry.Sentry.init(Sentry.java:44)
at sentry.SentryDemo$.main(SentryDemo.scala:16)
at sentry.SentryDemo.main(SentryDemo.scala)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
我需要添加什么来代替属性文件中的 dsn
吗?我在我的项目中使用 Sentry ,这不是基于网络的项目
最佳答案
DSN 告诉 Sentry SDK 要命中哪个 Sentry 实例(例如 sentry.io
)以及事件属于 Sentry 中的哪个项目。
您需要从 Sentry 获取 DSN 并添加到您的项目中。在 Sentry 中,在项目设置页面中,您将看到:Client keys (DSN)
:
然后您将看到如下 DSN:
复制这个(右边的按钮),并粘贴到您的 sentry.properties
替换占位符:https://public:private@host:port/1
关于java - io.sentry.SentryClientFactory - 从 : 'https://public:private@host:port/1' 创建有效的 DSN 时出错,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/54093129/
编辑 1 我尝试创建并使用系统 DSN。我按照下面类似的步骤进行了成功的连接尝试。然后我修改了连接字符串以引用这个新的 DSN。我收到错误指定的 DSN 包含驱动程序和应用程序之间的架构不匹配。 为了
编辑 1 我尝试创建和使用系统 DSN。我按照以下类似步骤进行了成功的连接尝试。然后我修改了我的连接字符串以引用这个新的 DSN。我收到错误消息The specified DSN contains a
有人可以帮我解决这个问题吗?我需要通过系统 DSN 检查我与 AS400 服务器的 ODBC 连接,如果不存在特定的系统 DSN,则创建一个系统 DSN。我试过谷歌搜索,但没能找到对我有好处的东西。
我正在托管环境中编写一个小型 ASP.NET 应用程序(这意味着我不拥有该服务器)。 使用托管提供商的 webtools,我创建了一个指定驱动程序、服务器、UID、PWD 和数据库的 DSN。当我测试
有一段时间,我一直在尝试让一个 visual basic 6 应用程序在 Windows 7 中运行。最后一个问题是它在启动时找不到 DSN。凭直觉,我删除了系统 DSN 并以完全相同的方式创建它,但
在 AX2012 中,我想建立一个到 SQL Server 2008R2 的 ODBC 数据库连接。为此,我构建了 32 位系统 DSN“SQL Server Native Client 10.0”(
我有一个 SQL 数据库,并希望使用 VBA 连接到它以支持某些旧功能。我正在使用 ADODB 连接并且需要知道我的数据库 DSN 是什么。我怎样才能找到这个? 我正在使用 SQL Server 20
我从System32加载odbccp32.dll,甚至尝试从SysWow64使用。我使用SQLConfigDataSource函数为指定的驱动程序配置系统DSN。此功能可以成功配置32位驱动程序,但对
所以我创建了以下 docker-compose.yml 文件 web: build: ./config/apache volumes: - ./code:/var/ww
我有一个使用链接的 sql server 表作为数据源的 Access 表单。我需要尽快将此文件分发给其他用户,并且我需要一种方法来以编程方式将 DSN 安装到他们的机器上。这是手动设置链接的过程:
当尝试配置 symfony Messenger 时总是出现错误 No transport supports the given Messenger DSN "doctrine://default".
下面是在 VBA 应用程序中填充列表框的代码: Private Sub Form_Open(Cancel As Integer) ''#Populate list box control. D
PHP PDO 使用这种风格: MySQL mysql:host=hostname;dbname=databasename 在各自单独的参数中使用用户名和密码 PostgreSQL pgsql:hos
我有一个 Excel 应用程序,我想在其中向用户显示数据源名称(即 DSN)的列表,以便她/他可以选择要使用的数据源。 希望一旦获得列表,我就可以轻松访问 DSN 属性以连接到适当的数据库。 请注意,
PHP PDO 使用这种风格: MySQL mysql:host=hostname;dbname=databasename 在各自单独的参数中使用用户名和密码 PostgreSQL pgsql:hos
PDO DSN 的官方文档页面尚未列出用户名或密码。这些键值对的正确名称是什么? 最佳答案 看起来文档还没有更新,但是this is the related change来自 PHP 的源存储库,说明
我们有一个 ASP.NET 网站,该网站使用我们希望能够使用连接字符串访问的数据库。我们已经成功设置了一个 DSN 来连接到该数据库,但我似乎无法发现连接字符串的正确魔力。 有没有一种简单的方法可以将
我正在尝试在运行时创建一个 ACCESS DB,并使用以下代码在 ODBC.ini 中注册为 DSN: BOOL fCreated; fCreated = SQLConfigDataSource(N
我遇到了这个错误: The specified DSN contains an architecture mismatch between the Driver and Application 尝试使
我第一次尝试在 PHP 中使用异常,但进展不太顺利。 我有一个名为dsn的变量,它包含PDO/MySQL的连接字符串。 当我在 dsn 上使用 var_dump 时,它返回“null”,因此我可以假设
我是一名优秀的程序员,十分优秀!