def iopipe_with_logger_debug(): plugin = LoggerPlugin(name="testlog", enabled=True) return IOpipeCore( token="test-suite", url="https://metrics-api.iopipe.com", debug=True, plugins=[plugin], )
def iopipe_with_logger_disabled(): plugin = LoggerPlugin(name="testlog", enabled=False) return IOpipeCore(token="test-suite", url="https://metrics-api.iopipe.com", plugins=[plugin])
from urllib.request import urlopen except ImportError: from urllib2 import urlopen from iopipe import IOpipe, IOpipeCore from iopipe.contrib.eventinfo import EventInfoPlugin from iopipe.contrib.logger import LoggerPlugin from iopipe.contrib.profiler import ProfilerPlugin from iopipe.contrib.trace import TracePlugin iopipe = IOpipe(debug=True) eventinfo_plugin = EventInfoPlugin() iopipe_with_eventinfo = IOpipeCore(debug=True, plugins=[eventinfo_plugin]) logger_plugin = LoggerPlugin() iopipe_with_logging = IOpipeCore(debug=True, plugins=[logger_plugin]) logger_plugin_tmp = LoggerPlugin(use_tmp=True) iopipe_with_logging_tmp = IOpipeCore(debug=True, plugins=[logger_plugin_tmp]) profiler_plugin = ProfilerPlugin(enabled=True) iopipe_with_profiling = IOpipeCore(debug=True, plugins=[profiler_plugin]) iopipe_with_sync_http = IOpipe(debug=True, sync_http=True) trace_plugin = TracePlugin() iopipe_with_tracing = IOpipeCore(debug=True, plugins=[trace_plugin]) @iopipe_with_eventinfo
import requests import boto3 from iopipe import IOpipe, IOpipeCore from iopipe.contrib.eventinfo import EventInfoPlugin from iopipe.contrib.logger import LoggerPlugin from iopipe.contrib.profiler import ProfilerPlugin from iopipe.contrib.trace import TracePlugin iopipe = IOpipe(debug=True) eventinfo_plugin = EventInfoPlugin() iopipe_with_eventinfo = IOpipeCore(debug=True, plugins=[eventinfo_plugin]) logger_plugin = LoggerPlugin(enabled=True) iopipe_with_logging = IOpipeCore(debug=True, plugins=[logger_plugin]) logger_plugin_tmp = LoggerPlugin(enabled=True, use_tmp=True) iopipe_with_logging_tmp = IOpipeCore(debug=True, plugins=[logger_plugin_tmp]) profiler_plugin = ProfilerPlugin(enabled=True) iopipe_with_profiling = IOpipeCore(debug=True, plugins=[profiler_plugin]) iopipe_with_sync_http = IOpipe(debug=True, sync_http=True) trace_plugin = TracePlugin() iopipe_with_tracing = IOpipeCore(debug=True, plugins=[trace_plugin]) trace_plugin_auto_http = TracePlugin(auto_http=True) iopipe_with_auto_http = IOpipeCore(debug=True,
def iopipe_with_logger(): plugin = LoggerPlugin('testlog') return IOpipeCore(token='test-suite', url='https://metrics-api.iopipe.com', plugins=[plugin])
def iopipe_with_logger_use_tmp(): plugin = LoggerPlugin(name='testlog', use_tmp=True) return IOpipeCore(token='test-suite', url='https://metrics-api.iopipe.com', plugins=[plugin])