diff --git a/datadog/api/api_client.py b/datadog/api/api_client.py index 4c70a20e1..af8d4d53d 100644 --- a/datadog/api/api_client.py +++ b/datadog/api/api_client.py @@ -273,6 +273,7 @@ def _set_api_and_app_keys_in_params(cls, api_version, path): constructed_path = construct_path(api_version, path) set_of_paths = { + "v1/distribution_points", "v1/series", "v1/check_run", "v1/events", diff --git a/tests/integration/api/test_api.py b/tests/integration/api/test_api.py index bde0d0a00..c4d27780b 100644 --- a/tests/integration/api/test_api.py +++ b/tests/integration/api/test_api.py @@ -259,6 +259,25 @@ def retry_condition(r): assert len(metric_query_tuple["series"][0]["pointlist"]) == 1 assert metric_query_tuple["series"][0]["pointlist"][0][1] == 1 + def test_distribution_metrics(self): + now = datetime.datetime.now() + now_ts = int(time.mktime(now.timetuple())) + metric_name = "test.distribution_metric." + str(now_ts) + host_name = "test.host." + str(now_ts) + + # Submit a distribution metric + assert dog.Distribution.send( + distributions=[{ + 'metric': metric_name, + 'points': [(now_ts - 60, [1.0])], + 'type': 'distribution', + 'host': host_name, + }] + )["status"] == "ok" + + # FIXME: Query and verify the test metric result. Currently, it takes + # too long for a new distribution metric to become available for query. + def test_graph_snapshot(self): metric_query = "system.load.1{*}" event_query = "*"