如何存储我的Web应用程序的指标? [英] How to store metrics for my web app?

查看:62
本文介绍了如何存储我的Web应用程序的指标?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要为我的Web应用存储更多指标.用户行为和其他条件需要随着时间的推移进行跟踪并进行比较.

I need to store more metrics for my web app. User behavior and other conditions needs to be tracked over time and compared.

某些记录具有与之相关的时间戳,有些则没有.因此,按需查询指标可能并不总是适合.我认为需要编写(然后通过cronjob?)某些分析查询的快照(每天?),然后将其存储在某个地方(DB?文件?).

Some records have a timestamp associated with it, some don't. So an on-demand query for metrics might not be suitable all the time. I think what is needed is a snapshot (daily?) of certain analytics queries (via a cronjob?) that I write and then stored somewhere (DB? file?).

现在,如果要将快照保存在数据库中,我会担心这些快照的大小.它将如何影响我的应用程序的性能?

Right now I'm worried about the size of these snapshots if I were to save them in the DB. How will it affect my app's performance?

管理员应该能够在Web仪表板上查看这些分析.想象一下,每天存储10万多行数据的状态...然后经常查询它们以进行分析.

Admins should be able to view these analytics on a web dashboard. Imagine storing the state of 100,000+ rows of data every day....and then querying them pretty often to do analysis.

还有其他好的方法来存储和查看指标吗?我正在为我的应用程序使用LAMP堆栈.还使用Google Analytics(分析)和其他第三方指标跟踪工具,但是跟踪我的应用程序的专门统计信息还不够.

Are there other good approaches to storing and viewing metrics? I'm using the LAMP stack for my app. Also using Google Analytics and other 3rd party metric tracking tools but it's not good enough to track specialized statistics for my app.

推荐答案

如果是这样,我会为快照设置一个单独的DB(可能在完全不同的服务器上).如果管理员要在Web界面中查看它们,我可能会坚持使用数据库.这样,您可以运行基本分析信息的快照,然后可以构建一个单独的界面/应用来进一步查询该数据并将其呈现.

If it is that intensive i would set up a separate DB (possibly on an entirely different server) for the snapshots. If admins are going to view them in a web interface i would probably stick with a DB though. That way you can just run snapshot of base analytic info, then you can build a separate interface/app to query that data further and present it.

正如加尔文(Calvin)在评论中所说,最好有一些记录数据的示例,以及您认为每天将要记录的数据量.该信息可能会改变我对此的想法.

As Calvin said in his comment, it would be good have some examples of the data youre recording though as well as how much of it you think there is going to be on the daily. That info might change my thoughts on it.

这篇关于如何存储我的Web应用程序的指标?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆