MiniProfiler 结果 UI 显示空名称,因为使用了 SqlServerStorage

MiniProfiler results UI shows empty names since using SqlServerStorage

我们一直在使用 MiniProfiler 作为分析我们的 ASP.NET MVC 5 应用程序性能的简单方法。它在开发中运行良好,但是当我们将应用程序放到网络场上时,我们很快意识到我们需要使用 different/shared 存储介质。

我们通过

迁移到 SqlServerStorage

MiniProfiler.Settings.Storage = new SqlServerStorage(System.Configuration.ConfigurationManager.ConnectionStrings["SqlDb"].ConnectionString)

进入MvcApplication.Application_Start (Global.asax)

我们使用 StackExchange.Profiling.Storage.SqlServerStorage.TableCreationScript 中的脚本创建了 MiniProfiler 表。

自从使用 SqlServerStorage 后,我们发现 MiniProfiler UI 不再正常运行;我们得到以下信息:

如您所见,名称栏是空的。有人知道我是否需要配置其他东西吗?

这已在 MiniProfiler v4(目前处于 alpha 阶段)中修复。不幸的是,v3 没有将 Name 字段存储在 SQL 服务器中。是 listed as a breaking change in the upgrade notes since it requires a schema addition。我无法在 v3 中进行此更改 因为 这是一个重大更改。

期待 MiniProfiler v4 在接下来的几周内退出 alpha,因为我们在生产中对它进行大量测试,并推进到 beta 和发布。