# Path: performanceplatform/utils/requests_with_backoff.py
# _MAX_RETRIES = 5
# def get(url, *args, **kwargs):
# def post(url, *args, **kwargs):
# def __request_with_backoff(method, url, *args, **kwargs):
# 
# Path: performanceplatform/collector/logging_setup.py
# def extra_fields_from_exception(exception):
#     """Exception into a dict to be passed to logger
# 
#     Standardise the way we send exception messages so they can be filtered in
#     kibana, also make it easy to add extra information in future.
#     """
#     return {
#         'exception_class': type(exception).__name__,
#         'exception_message': exception.message
#     }


from datetime import datetime
from performanceplatform.utils import requests_with_backoff
from performanceplatform.collector.logging_setup import (
    extra_fields_from_exception )
import pytz
import time
import logging


class Pingdom(object):
    def __init__(self, config):
        self.user = config['user']
        self.password = config['password']
        self.app_key = config['app_key']
        self.account_email = config['account_email']
        self.API_LOCATION = "https://api.pingdom.com/api/2.0/"

    def _make_request(self, path, url_params=None):
        if url_params is None:
            url_params = {}

# Path: performanceplatform/utils/requests_with_backoff.py
# _MAX_RETRIES = 5
# def get(url, *args, **kwargs):
# def post(url, *args, **kwargs):
# def __request_with_backoff(method, url, *args, **kwargs):
# 
# Path: performanceplatform/collector/logging_setup.py
# def extra_fields_from_exception(exception):
#     """Exception into a dict to be passed to logger
# 
#     Standardise the way we send exception messages so they can be filtered in
#     kibana, also make it easy to add extra information in future.
#     """
#     return {
#         'exception_class': type(exception).__name__,
#         'exception_message': exception.message
#     }


# Path: performanceplatform/collector/pingdom/core.py
from datetime import datetime
from performanceplatform.utils import requests_with_backoff
from performanceplatform.collector.logging_setup import (
    extra_fields_from_exception )
import pytz
import time
import logging



class Pingdom(object):
    def __init__(self, config):
        self.user = config['user']
        self.password = config['password']
        self.app_key = config['app_key']
        self.account_email = config['account_email']
        self.API_LOCATION = "https://api.pingdom.com/api/2.0/"

    def _make_request(self, path, url_params=None):
        if url_params is None:
            url_params = {}

        response = requests_with_backoff.get(