未加星标

Metrics with Django and Redis

字体大小 | |
[数据库(综合) 所属分类 数据库(综合) | 发布者 店小二05 | 时间 2016 | 作者 红领巾 ] 0人收藏点击收藏

So, you've got a shiny new Django-powered site, and now you'd like to start recording metrics. Perhaps you've read The Lean Startup , and you know you've got to know how people are using your site in order to know what to improve. Perhaps you're just a data nerd and you like to count things. Either way, there are ton's of ways to measure things on your site.

You could use third-party applications like Google Analytics or Mixpanel to see how people interact with your site. Then there are services like New Relic that give you amazing insights as to where your application is slow or too memory hungry. All of these services are really good, and if you're building a startup, you should be using them.

But sometimes, you need a little more flexibility when counting things . That's the motivation behind django-redis-metrics . It's a simple, lightweight Django app that lets you easily record metrics in your Django apps.

I use it on Work for Pie to measure things such as:

User growth External API usage (e.g. how hard we're hitting the GitHub or StackOverflow APIs) User interaction (e.g. how frequently somone follows a company )

Once installed, it's fairly simple to start recording metrics. You can call out to the metric function anywhere in your code, and that will increment a counter every time the function is called.

from redis_metrics import metric
metric("thing-i-want-to-measure")

All data is stored in Redis (which is a great data store for this kind of thing). and there are very few dependencies. django-redis-metrics aims to be a fairly minimalistic, and very simple to use out of the box.

If you need a simple way to measure arbitrary events in a Django app, please give it a look.

本文数据库(综合)相关术语:系统安全软件

主题: DjangoRedisGitGitHub
分页:12
转载请注明
本文标题:Metrics with Django and Redis
本站链接:http://www.codesec.net/view/480276.html
分享请点击:


1.凡CodeSecTeam转载的文章,均出自其它媒体或其他官网介绍,目的在于传递更多的信息,并不代表本站赞同其观点和其真实性负责;
2.转载的文章仅代表原创作者观点,与本站无关。其原创性以及文中陈述文字和内容未经本站证实,本站对该文以及其中全部或者部分内容、文字的真实性、完整性、及时性,不作出任何保证或承若;
3.如本站转载稿涉及版权等问题,请作者及时联系本站,我们会及时处理。
登录后可拥有收藏文章、关注作者等权限...
技术大类 技术大类 | 数据库(综合) | 评论(0) | 阅读(33)