@@ -17,6 +17,7 @@ class MetricType:
1717 Gauge = 'gauges'
1818 Availability = 'availability'
1919 Counter = 'counters'
20+ Rate = 'rate'
2021
2122 @staticmethod
2223 def short (metric_type ):
@@ -92,9 +93,12 @@ def _get_url(self, metric_type):
9293
9394 def _get_metrics_single_url (self , metric_type , metric_id ):
9495 return self ._get_url (metric_type ) + '/{0}' .format (self ._clean_metric_id (metric_id ))
95-
96- def _get_metrics_data_url (self , metrics_url ):
97- return metrics_url + '/data'
96+
97+ def _get_metrics_raw_url (self , metrics_url ):
98+ return metrics_url + '/raw'
99+
100+ def _get_metrics_stats_url (self , metrics_url ):
101+ return metrics_url + '/stats'
98102
99103 def _get_metrics_tags_url (self , metrics_url ):
100104 return metrics_url + '/tags'
@@ -206,7 +210,7 @@ def put(self, data):
206210
207211 # This isn't transactional, but .. ouh well. One can always repost everything.
208212 for l in r :
209- self ._post (self ._get_metrics_data_url (self ._get_url (l )), r [l ])
213+ self ._post (self ._get_metrics_raw_url (self ._get_url (l )), r [l ])
210214
211215 def push (self , metric_type , metric_id , value , timestamp = None , ** tags ):
212216 """
@@ -222,12 +226,12 @@ def query_metric(self, metric_type, metric_id, **search_options):
222226 """
223227 Query for metrics from the server.
224228
225- Supported search options are [optional]: start, end and buckets
229+ Supported search options are [optional]: start, end
226230
227231 Use methods query_single_gauge and query_single_availability for simple access
228232 """
229233 return self ._get (
230- self ._get_metrics_data_url (
234+ self ._get_metrics_raw_url (
231235 self ._get_metrics_single_url (metric_type , metric_id )),
232236 ** search_options )
233237
0 commit comments