ASP.NET 应用程序中的指标
我需要在 ASP.NET 应用程序(Framework 2.0、SQL Server 2005)中添加一些指标和统计功能。这是 Intranet 应用程序,所以我无法使用 Google Analytics。
我不仅需要测量点击量和访问量,还需要测量人们按下了哪些按钮以及正在使用应用程序的哪些功能。
使用 IIS 日志和 MS Log Parser 就足够了,还是我应该将所有人的操作写入数据库并进行分析?
我可以使用一些组件吗?
谢谢。
I need to add some metrics and statistics capabilities in ASP.NET application (Framework 2.0, SQL Server 2005). It's Intranet application, so I can't use Google Analytics.
I need not only measure number of hits and visits, but also which buttons people are pressing and which functions of application are using.
Will it be enough to use IIS logs and MS Log Parser or should I write all people action to database and the analyse them?
Are the some components, which I can use?
Thank you.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
在决定如何生成所需指标之前,您应该定义所需的指标,然后开始研究要使用的解决方案。
IIS 日志肯定会告诉您访问了哪些页面,但考虑到 ASP.NET 的回发性质(除非您指的是 ASP.NET MVC 应用程序),它不会为您提供信息关于已按下“哪个按钮”。如果您需要这种级别的信息,您最终将不得不在某个地方记录一些数据。数据库几乎肯定是最好的选择,因为这样就可以很容易地编写 SQL 查询来挖掘数据。缺点是您需要在您关心收集数据的每个位置添加对日志记录例程的调用。
需要记住的一件事是您记录的数据量以及管理数据的方式。如果您记录太多,或者没有归档/清除计划,您可能会发现最终的日志数据多于应用程序数据,如果应用程序被大量用户大量使用,这可能会造成问题。我不止一次看到名为
ProcessLog
或Trace
的表包含的数据比系统其余部分加起来还要多。Before you decide how you're going to produce the metrics you require, you should define what metrics you require and then start investigating solutions to use.
IIS logs will certainly tell you what pages have been visited, but given the postback nature of asp.net (unless you're referring to an asp.net mvc application), it won't give you information regarding "which button" has been pressed. If you need that level of information you're ultimately going to have to log some data somewhere. A database is almost certainly the best bet as it's then very easy to write SQL queries to mine the data. The downside is that you'll need to add calls to your logging routine in each place that you care about gathering data.
One thing to bear in mind is the volume of data that you're logging and how you manage it. If you log too much, or have no archival/clear-out plan, you could find that you end up with more log data than application data which can pose a problem if the application is used heavily by a large number of users. I've seen, more than once, tables called
ProcessLog
orTrace
that contain more data than the rest of the system combined.尝试直布罗陀。它与 ASP.NET 运行状况监控内置集成,包括详细的页面指标跟踪,以及通过简单地用属性标记关键方法来跟踪人们按下的按钮以及正在使用的应用程序的功能。
Gibraltar 还提供了一个非阻塞、线程安全的日志框架、一个用于收集日志的 Web 服务以及一个具有广泛过滤和绘图功能的分析工具。如果您已经在使用 Log4Net、NLog 或其他框架,直布罗陀有连接器来集成这些数据流。
直布罗陀为多用户许可证捆绑提供 30 天免费试用和大幅折扣。它不是免费的,但它得到了一支充满热情、经验丰富的团队的积极支持,他们真正了解并关心日志记录和应用程序监控。如果您有疑问,请与我们聊天。
Try GIBRALTAR. It has built-in integration with ASP.NET Health Monitoring including detailed page metric tracking and tracking of which buttons people are pressing and which functions of application are using by simply tagging key methods with an attribute.
Gibraltar also provides a non-blocking, threadsafe logging framework, a web service to collect logs and an analysis tool with extensive filtering and graphing capabilities. If you're already using Log4Net, NLog or other frameworks, Gibraltar has connectors to integrate those data streams.
Gibraltar offers a free 30-day trial and deep discounts for multi-user license bundles. It's not free, but it is actively supported by a passionate, experienced team that really knows and cares about logging and application monitoring. Chat with us if you have questions.