Ejemplo n.º 1
0
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)
Ejemplo n.º 2
0
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)
Ejemplo n.º 3
0
def record_internal_failure(log, **kwargs):
    params = {"log": log}
    params.update(kwargs)
    new_relic.record_custom_event("kirin_internal_failure", params)
Ejemplo n.º 4
0
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)
Ejemplo n.º 5
0
def record_internal_failure(log, **kwargs):
    params = {'log': log}
    params.update(kwargs)
    new_relic.record_custom_event('kirin_internal_failure', params)