DataDog/dogapi — pull request #4 by clutchski (2012-03-22 00:01:51+00:00)
Title: 1.0

This isn't ready for external release, so this pull request is just for review, it shouldn't get merged.

Changes:

- Includes all of Carlo's change from v0 -> v1.
- Added metric roll-ups (counter, gauges, naive histograms)
- Added three flush options - thread, greenlet, in-process.

Still to do:

- Add a graphite forwarder to send to dd-agent.
- Add tests for threaded/greenlet mode (i have an example app which I've been using, which needs clearning up)
- Make the histogram a real histogram (percentiles, etc.)
- Add a meter roll-up type
- Handle error cases in threads better.
- Clean up the API. I'd like to separate asynchronous batched calls (counter, histogram, etc.) from the straight http api (metric, event, comment, etc.) so it's clear to the user what is safe to use in high volume prod code. We should chat about this, but something like so:

```python
# http api
dogapi.http.create_event('blah blah')
dogapi.http.create_metric('my.metric', ...)

# batched wrapper
dog = dogapi.Datadog(threaded=true, flush_interval=10, roll_up_interval=10)
dog.increment('my.counter')
```