Module Assign NameStore ListLoad Str Import alias Import alias Import alias Import alias Import alias ImportFrom alias ImportFrom alias TryExcept body Import alias identifier handlers ExceptHandler type NameLoad body Import alias Assign NameStore Call AttributeLoad NameLoad attr Str Assign NameStore Call AttributeLoad NameLoad attr Str ImportFrom alias ImportFrom alias ImportFrom alias If Call NameLoad body Import alias identifier ImportFrom alias orelse Import alias identifier ImportFrom alias Assign NameStore ListLoad Str ClassDef bases NameLoad body FunctionDef arguments args NameParam NameParam NameParam NameParam NameParam NameParam NameParam NameParam NameParam NameParam NameParam defaults NameLoad NameLoad Str NameLoad Num Num Num NameLoad NameLoad NameLoad body Assign AttributeStore NameLoad attr AttributeLoad NameLoad attr Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr BoolOpOr NameLoad Call AttributeLoad AttributeLoad NameLoad attr attr Str Str Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr Num Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr Call AttributeLoad NameLoad attr Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam NameParam NameParam defaults NameLoad NameLoad NameLoad kwarg body TryExcept body If UnaryOpNot Call AttributeLoad NameLoad attr body Raise Call NameLoad Call AttributeLoad Str attr Call AttributeLoad NameLoad attr If AttributeLoad NameLoad attr body Assign SubscriptStore NameLoad Index Str AttributeLoad NameLoad attr If AttributeLoad NameLoad attr body Assign SubscriptStore NameLoad Index Str AttributeLoad NameLoad attr Assign NameStore BinOpMod Str TupleLoad AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr Str Call NameLoad NameLoad TryExcept body Assign NameStore Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr keyword AttributeLoad NameLoad attr handlers ExceptHandler type NameLoad body Assign NameStore Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Assign NameStore Dict If Call NameLoad NameLoad NameLoad body Assign NameStore Call AttributeLoad NameLoad attr NameLoad Assign SubscriptStore NameLoad Index Str Str TryFinally body Assign NameStore Call AttributeLoad NameLoad attr TryExcept body Expr Call AttributeLoad NameLoad attr NameLoad NameLoad NameLoad NameLoad handlers ExceptHandler type NameLoad body AugAssignAdd AttributeStore NameLoad attr Num Raise Call NameLoad BinOpMod Str TupleLoad NameLoad NameLoad AttributeLoad NameLoad attr ExceptHandler type AttributeLoad NameLoad attr name NameStore body Raise Call NameLoad BinOpMod Str TupleLoad NameLoad AttributeLoad NameLoad attr NameLoad NameLoad Assign AttributeStore NameLoad attr Num Assign NameStore Call AttributeLoad NameLoad attr Assign NameStore Call NameLoad BinOpMult BinOpSub Call AttributeLoad NameLoad attr NameLoad Num Num Expr Call AttributeLoad NameLoad attr BinOpMod Str TupleLoad AttributeLoad NameLoad attr NameLoad NameLoad NameLoad Assign NameStore Call AttributeLoad NameLoad attr If NameLoad body TryExcept body If Call NameLoad body Assign NameStore Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr Str orelse Assign NameStore Call AttributeLoad NameLoad attr NameLoad handlers ExceptHandler type NameLoad body Raise Call NameLoad Call AttributeLoad Str attr NameLoad If BoolOpAnd NameLoad CompareIn Str NameLoad body Raise Call NameLoad NameLoad orelse Assign NameStore NameLoad If BoolOpAnd CompareIs NameLoad NameLoad AttributeLoad NameLoad attr body Assign NameStore Dict If BoolOpOr AttributeLoad NameLoad attr CompareIs NameLoad NameLoad body Return NameLoad orelse Return Call NameLoad NameLoad finalbody Expr Call AttributeLoad NameLoad attr handlers ExceptHandler type NameLoad name NameStore body If AttributeLoad NameLoad attr body Expr Call AttributeLoad NameLoad attr Call NameLoad NameLoad If BoolOpOr AttributeLoad NameLoad attr CompareIs NameLoad NameLoad body Return Dict Str SubscriptLoad AttributeLoad NameLoad attr Index Num orelse Return Call NameLoad Dict Str SubscriptLoad AttributeLoad NameLoad attr Index Num orelse Raise ExceptHandler type NameLoad name NameStore body If AttributeLoad NameLoad attr body For NameStore SubscriptLoad SubscriptLoad AttributeLoad NameLoad attr Index Num Index Str body Expr Call AttributeLoad NameLoad attr Call NameLoad NameLoad If BoolOpOr AttributeLoad NameLoad attr CompareIs NameLoad NameLoad body Return SubscriptLoad AttributeLoad NameLoad attr Index Num orelse Return Call NameLoad SubscriptLoad AttributeLoad NameLoad attr Index Num orelse Raise decorator_list FunctionDef arguments args defaults body FunctionDef arguments args NameParam defaults body Return AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam NameParam defaults body Assign AttributeStore NameLoad attr NameLoad If NameLoad body Assign AttributeStore NameLoad attr Call NameLoad orelse Assign AttributeStore NameLoad attr Call AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam defaults body Delete AttributeDel NameLoad attr decorator_list Return Call NameLoad decorator_list Assign NameStore Call NameLoad Call NameLoad FunctionDef arguments args defaults body FunctionDef arguments args NameParam defaults body Return AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam NameParam defaults body Assign NameStore Call AttributeLoad NameLoad attr Str NameLoad Assign NameStore AttributeLoad NameLoad attr If NameLoad body Assign NameStore Call AttributeLoad NameLoad attr Num If CompareEq Call AttributeLoad NameLoad attr Num Str body Assign NameStore AttributeLoad NameLoad attr orelse Assign NameStore NameLoad Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad decorator_list Return Call NameLoad decorator_list Assign NameStore Call NameLoad Call NameLoad FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore Call AttributeLoad NameLoad attr Assign NameStore NameLoad If BoolOpAnd UnaryOpNot AttributeLoad NameLoad attr CompareGtE AttributeLoad NameLoad attr AttributeLoad NameLoad attr body Expr Call AttributeLoad NameLoad attr Call AttributeLoad Str attr AttributeLoad NameLoad attr Assign AttributeStore NameLoad attr NameLoad Assign NameStore NameLoad orelse If AttributeLoad NameLoad attr body Assign TupleStore NameStore NameStore Call AttributeLoad NameLoad attr If CompareLt NameLoad Num body Expr Call AttributeLoad NameLoad attr Call AttributeLoad Str attr NameLoad Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr Num Assign NameStore NameLoad orelse Expr Call AttributeLoad NameLoad attr Call AttributeLoad Str attr NameLoad Assign NameStore NameLoad orelse Assign NameStore NameLoad Return NameLoad decorator_list FunctionDef arguments args NameParam defaults body Assign NameStore Call AttributeLoad NameLoad attr Assign NameStore BinOpSub NameLoad AttributeLoad NameLoad attr Assign NameStore BinOpSub AttributeLoad NameLoad attr NameLoad Return TupleLoad Call NameLoad NameLoad Num Call NameLoad NameLoad Num decorator_list decorator_list
N/A N/A __all__ N/A BaseDatadog N/A os N/A logging N/A re N/A socket N/A time contextlib contextmanager pprint pformat N/A N/A N/A simplejson json N/A N/A N/A ImportError N/A N/A json N/A http_log N/A N/A logging getLogger dd.dogapi.http N/A log N/A N/A logging getLogger dd.dogapi dogapi.exceptions * dogapi.constants * dogapi.common * N/A N/A is_p3k N/A N/A http.client http_client urllib.parse urlencode N/A N/A httplib http_client urllib urlencode N/A __all__ N/A BaseDatadog BaseDatadog N/A object N/A __init__ N/A N/A self api_key application_key api_version api_host timeout max_timeouts backoff_period swallow use_ec2_instance_id json_responses N/A None None v1 None 2 3 300 True False False N/A N/A N/A self http_conn_cls N/A http_client HTTPSConnection N/A N/A self _api_host None N/A N/A self api_host N/A api_host N/A N/A N/A os environ get DATADOG_HOST https://app.datadoghq.com N/A N/A self backoff_period backoff_period N/A N/A self max_timeouts max_timeouts N/A N/A self _backoff_timestamp None N/A N/A self _timeout_counter 0 N/A N/A self api_key api_key N/A N/A self api_version api_version N/A N/A self application_key application_key N/A N/A self timeout timeout N/A N/A self swallow swallow N/A N/A self _default_host N/A N/A socket gethostname N/A N/A self _use_ec2_instance_id None N/A N/A self use_ec2_instance_id use_ec2_instance_id N/A N/A self json_responses json_responses N/A http_request N/A N/A self method path body response_formatter error_formatter N/A None None None params N/A N/A N/A N/A N/A N/A N/A self _should_submit N/A N/A N/A HttpBackoff N/A N/A Too many timeouts. Won't try again for {1} seconds. format N/A N/A self _backoff_status N/A N/A self api_key N/A N/A N/A params N/A api_key N/A self api_key N/A N/A self application_key N/A N/A N/A params N/A application_key N/A self application_key N/A url N/A /api/%s/%s?%s N/A N/A self api_version N/A N/A path lstrip / N/A urlencode params N/A N/A N/A conn N/A N/A self http_conn_cls N/A self api_host timeout N/A self timeout N/A N/A N/A TypeError N/A N/A conn N/A N/A self http_conn_cls N/A self api_host N/A headers N/A N/A N/A isinstance body dict N/A N/A body N/A N/A json dumps body N/A N/A headers N/A Content-Type application/json N/A N/A N/A start_time N/A N/A time time N/A N/A N/A N/A N/A conn request method url body headers N/A N/A N/A timeout_exceptions N/A N/A N/A self _timeout_counter 1 N/A N/A HttpTimeout N/A %s %s timed out after %d seconds. N/A method url N/A self timeout N/A N/A N/A socket error N/A e N/A N/A N/A ClientError N/A Could not request %s %s%s: %s N/A method N/A self api_host url e N/A N/A self _timeout_counter 0 N/A response N/A N/A conn getresponse N/A duration N/A round N/A N/A N/A N/A time time start_time 1000.0 4 N/A N/A N/A log info N/A %s %s %s (%sms) N/A N/A response status method url duration N/A response_str N/A N/A response read N/A response_str N/A N/A N/A N/A N/A is_p3k N/A N/A response_obj N/A N/A json loads N/A N/A response_str decode utf-8 N/A N/A response_obj N/A N/A json loads response_str N/A N/A N/A ValueError N/A N/A N/A ValueError N/A N/A Invalid JSON response: {0} format response_str N/A N/A response_obj N/A errors response_obj N/A N/A N/A ApiError response_obj N/A N/A response_obj None N/A N/A N/A response_obj None N/A self json_responses N/A N/A response_obj N/A N/A N/A N/A self json_responses N/A response_formatter None N/A N/A response_obj N/A N/A N/A response_formatter response_obj N/A N/A N/A N/A conn close N/A N/A N/A ClientError N/A e N/A N/A N/A self swallow N/A N/A N/A N/A log error N/A str e N/A N/A N/A self json_responses N/A error_formatter None N/A N/A N/A errors N/A N/A e args N/A 0 N/A N/A N/A error_formatter N/A errors N/A N/A e args N/A 0 N/A N/A N/A N/A ApiError N/A e N/A N/A N/A self swallow N/A N/A error N/A N/A N/A e args N/A 0 N/A errors N/A N/A N/A N/A log error N/A str error N/A N/A N/A self json_responses N/A error_formatter None N/A N/A N/A N/A e args N/A 0 N/A N/A N/A error_formatter N/A N/A e args N/A 0 N/A N/A N/A use_ec2_instance_id N/A N/A N/A N/A fget N/A N/A self N/A N/A N/A N/A self _use_ec2_instance_id N/A fset N/A N/A self value N/A N/A N/A N/A self _use_ec2_instance_id value N/A value N/A N/A N/A self _default_host N/A get_ec2_instance_id N/A N/A N/A self _default_host N/A N/A socket gethostname N/A fdel N/A N/A self N/A N/A N/A N/A self _use_ec2_instance_id N/A N/A N/A locals N/A N/A use_ec2_instance_id N/A property N/A use_ec2_instance_id api_host N/A N/A N/A N/A fget N/A N/A self N/A N/A N/A N/A self _api_host N/A fset N/A N/A self value N/A N/A N/A match N/A N/A re match ^(https?)://(.*) value N/A http_conn_cls N/A http_client HTTPSConnection N/A match N/A N/A host N/A N/A match group 2 N/A N/A N/A N/A match group 1 http N/A N/A http_conn_cls N/A http_client HTTPConnection N/A N/A host value N/A N/A self _api_host host N/A N/A self http_conn_cls http_conn_cls N/A N/A N/A locals N/A N/A api_host N/A property N/A api_host _should_submit N/A N/A self N/A N/A N/A  Returns True if we're in a state where we should make a request
        (backoff expired, no backoff in effect), false otherwise.
         N/A now N/A N/A time time N/A should_submit False N/A N/A N/A N/A self _backoff_timestamp N/A N/A self _timeout_counter N/A self max_timeouts N/A N/A N/A N/A log info N/A N/A Max number of dogapi timeouts exceeded, backing off for {0} seconds format N/A self backoff_period N/A N/A self _backoff_timestamp now N/A should_submit False N/A N/A N/A self _backoff_timestamp N/A N/A N/A backed_off_time backoff_time_left N/A N/A self _backoff_status N/A N/A backoff_time_left 0 N/A N/A N/A N/A log info N/A N/A Exiting backoff state after {0} seconds, will try to submit metrics again format backed_off_time N/A N/A self _backoff_timestamp None N/A N/A self _timeout_counter 0 N/A should_submit True N/A N/A N/A N/A log info N/A N/A In backoff state, won't submit metrics for another {0} seconds format backoff_time_left N/A should_submit False N/A N/A should_submit True N/A should_submit N/A _backoff_status N/A N/A self N/A N/A N/A now N/A N/A time time N/A backed_off_time N/A now N/A self _backoff_timestamp N/A backoff_time_left N/A N/A self backoff_period backed_off_time N/A N/A N/A round backed_off_time 2 N/A round backoff_time_left 2 N/A N/A