Giter Club home page Giter Club logo

django-app-metrics's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

django-app-metrics's Issues

Gauges in Mixpanel

It is possible to emulate gauges in Mixpanel by posting the gauge value as a property of a metric and then using the aggregation functions (SUM or AVG) in the segmentation view to graph it.

No big deal to implement that in django-app-metrics and I'd be glad to do it, just wanted to ask if you think the idea is worth pursuing. Looking forward to feedback!

Deprecate support for Django <2.2

There are some updates I'd like to make e.g. #42, which would require dropping support for unsupported versions of Django.

@frankwiles would you be okay with making a major version update that breaks support for legacy Django? I'll help with PRs.

Celery is a big complex requirement if it's not needed

Installing celery (not especially a trivial task) if you don't need it seems especially onerous. I haven't examined the code but would conditional imports not remove the need for this?

(On a side note - there's often a simpler solution than Celery for many things it's used for - is this aspect of the code pluggable? A simple management command run via cron would be a good alternative for some)

Simplify report email

The emails that I receive would make more sense to me if they showed the following:

  • today so far
  • yesterday
  • today - 2
  • ...
  • today - 7
  • this week
  • this week - 1
    Etc

Would this be useful to others? I'd be happy to code it up if so.

shared memory vs celery option

Create a way to store up metrics in shared memory and periodically flush them to the backend removing the need/overhead of celery for extremely high traffic sites.

Running tests *requires* django-mailer, whereas nothing else does

Using django-app-metrics in a larger projects that is not otherwise using django-mailer means that the tests fail (they can't even be imported) because of a single use of mailer. Maybe the test can be written to avoid the use of mailer.send_all() or maybe it should be conditional upon the ability to import mailer. As it currently stands, things blow up.

Add documentation for running tests

The tests fail for me (Bare virtualenv, Django 1.4.1, python manage.py test) with connection errors in celery/kombu/amqplib. Is it necessary to have a fully configured celery running?

It would be very helpful to have a short description about the test requirements, alternatively removing as many external dependencies as possible would also be nice :-)

Let me know If I can support you with this!

Test output: https://gist.github.com/3417395

SECRET_KEY in settings

My question is wider than this project context. I integrated my django with Sentry (https://getsentry.com/welcome/), I provided a SECRET_KEY variable in my settings.py. Also in this project "tests/settings.py" have same variable.

When I import "APP_METRICS_BACKEND" from "app_metrics.tests.settings" to config djang-app-metrics. Django faced by this exception: "django.core.exceptions.ImproperlyConfigured: The SECRET_KEY setting must not be empty.".

MetricWeek.__unicode__() throws a TypeError

/a/venvs/venv/lib/python2.6/site-packages/app_metrics/models.pyc in unicode(self)
87 def unicode(self):
88 return "'%s' for week %d of %d" % (self.metric.name,
---> 89 self.created.strftime("%m"))
90

TypeError: %d format: a number is required, not str

redis-py no longer has an incrby method

I'm using redis-py 2.7.1 (instead of 2.6.2 as listed in requirements), and redis 2.6.7, and I'm getting the following exception:

Task app_metrics.tasks.redis_metric_task[d83b61b0-e35a-4170-902b-97d6e7c5a2f9] raised exception: AttributeError("'StrictRedis' object has no attribute 'incrby'",)
Traceback (most recent call last):
  File "/Users/brad/.virtualenvs/wfp-app-metrics/lib/python2.7/site-packages/celery/task/trace.py", line 224, in trace_task
    R = retval = fun(*args, **kwargs)
  File "/Users/brad/.virtualenvs/wfp-app-metrics/lib/python2.7/site-packages/celery/task/trace.py", line 406, in __protected_call__
    return self.run(*args, **kwargs)
  File "/Users/brad/django/workforpie/app_metrics/tasks.py", line 161, in redis_metric_task
    r.incrby(day_key, num)
AttributeError: 'StrictRedis' object has no attribute 'incrby'

This breaks in tasks/redis_metric_task.py where you increment keys for day, week, month, year:

r.incrby(day_key, num)

It appears that redis-py no longer includes an incrby method. There's an incrbyfloat method for float values, but I'm not sure that's what you want either.

Any thoughts on a preferred way to make this work with the current redis-py?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.