def record_call(status, **kwargs): """ status can be in: ok, warning, a message text or failure with reason. parameters: contributor, timestamp, trip_update_count, size... """ params = {"status": status} params.update(kwargs) new_relic.record_custom_event("kirin_status", params)
def record_call(event_type: str, status: str, **kwargs: Any) -> None: """ status can be in: ok, warning, a message text or failure with reason. parameters: contributor, timestamp, trip_update_count, size... """ params = {"status": status} params.update(kwargs) new_relic.record_custom_event(event_type, params)
def record_internal_failure(log, **kwargs): params = {"log": log} params.update(kwargs) new_relic.record_custom_event("kirin_internal_failure", params)
def record_input_retrieval(contributor, duration_ms, **kwargs): params = {"duration": duration_ms, "contributor": contributor} params.update(kwargs) logging.getLogger(__name__).info("Input retrieval", extra=params) new_relic.record_custom_event("kirin_input_retrieval", params)
def record_internal_failure(log, **kwargs): params = {'log': log} params.update(kwargs) new_relic.record_custom_event('kirin_internal_failure', params)