public static TraceRecord CreateErrorTrace(this TargetRecord targetRecord, string agentId, HttpStatusCode httpStatusCode, string?body, string?ex) { return(new TraceRecord { TargetId = targetRecord.Id, AgentId = agentId, Url = targetRecord.ReadyUrl, HttpStatusCode = httpStatusCode, Body = body, TargetState = TargetState.Error.ToString(), Exception = ex, }); }
public static TraceRecord CreateOkTrace(this TargetRecord targetRecord, string agentId, HttpStatusCode httpStatusCode, string?body, long ms) { return(new TraceRecord { TargetId = targetRecord.Id, AgentId = agentId, Url = targetRecord.ReadyUrl, HttpStatusCode = httpStatusCode, Body = body, TargetState = TargetState.Ok.ToString(), ProbeMs = ms, }); }