/// <summary> /// Emits the latency reading /// </summary> public static void Emit(IInstrumentation inst, string ctxName, string queryName, long msLatency, string queryParam = null) { if (inst == null || !inst.Enabled) { return; } var src = $"{ctxName}::{queryName}::{queryParam}"; var datum = new DataQueryLatency(src, msLatency); inst.Record(datum); datum = new DataQueryLatency(UNSPECIFIED_SOURCE, msLatency);//general inst.Record(datum); }
public static void Record(IInstrumentation inst, Node node, long value) { if (inst != null && inst.Enabled) { inst.Record(new ServerTransportChannelCount(node.ToString(), value)); } }
public static void Record(IInstrumentation inst, string key, double value) { if (inst != null && inst.Enabled) { inst.Record(new ClientCallRoundtripTime(key, value)); } }
public static void Record(IInstrumentation inst, Node node, long value) { if (inst != null && inst.Enabled) { inst.Record(new ClientTotalErrors(node.ToString(), value)); } }
public static void Record(IInstrumentation inst, long value) { if (inst != null && inst.Enabled) { inst.Record(new ClientTimedOutCallSlotsRemoved(value)); } }
public static void Happened(IInstrumentation inst, string tableName) { if (inst != null && inst.Enabled) { inst.Record(new CacheTableSwept(tableName)); } }
public static void Record(IInstrumentation inst, long value, string src = null) { if (inst != null && inst.Enabled) { inst.Record(new AvailableRAM(src, value)); } }
public static void Happened(IInstrumentation inst, Node node) { if (inst != null && inst.Enabled) { inst.Record(new ServerSerializedOverMaxMsgSizeErrorEvent(node.ToString())); } }
public static void Happened(IInstrumentation inst, Node node) { if (inst != null && inst.Enabled) { inst.Record(new ServerListenerErrorEvent(node.ToString())); } }
public static void Record(IInstrumentation inst, string source, long value) { if (inst != null && inst.Enabled) { inst.Record(new MessagingSinkErrorCount(source, value)); } }
public static void Record(IInstrumentation inst, long value) { if (inst != null && inst.Enabled) { inst.Record(new FiredEventCount(value)); } }
public static void Record(IInstrumentation inst, long value) { if (inst != null && inst.Enabled) { inst.Record(new RAMUsage(value)); } }
public static void Record(IInstrumentation inst, string source, long value) { if (inst != null && inst.Enabled) { inst.Record(new LogMsgCount(source, value)); } }
public static void Record(IInstrumentation inst, Node node, long value) { if (inst != null && inst.Enabled) { inst.Record(new ServerTotalMsgSent(node.ToString(), value)); } }
public static void Happened(IInstrumentation inst, string from) { if (inst != null && inst.Enabled) { inst.Record(new ClientDisconnectedEvent(from)); } }
public static void Happened(IInstrumentation inst) { if (inst != null && inst.Enabled) { inst.Record(new AuthLocationReadTotalFailureEvent()); } }
public static void Happened(IInstrumentation inst, string scope, string seq) { if (inst != null && inst.Enabled) { inst.Record(new AuthEraPromotedEvent("{0}:{1}".Args(scope, seq))); } }
public static void Happened(IInstrumentation inst, string location) { if (inst != null && inst.Enabled) { inst.Record(new AuthLocationReadFailureEvent(location)); } }
public static void Happened(IInstrumentation inst, string scope, string seq, int block, string authority) { if (inst != null && inst.Enabled) { inst.Record(new AllocBlockFailureEvent("{0}::{1}::{2}".Args(scope, seq, authority))); } }
public static void Record(IInstrumentation inst, long value) { if (inst != null && inst.Enabled) { inst.Record(new ProcessingInterval(value)); } }
public static void Happened(IInstrumentation inst, Node node) { if (inst != null && inst.Enabled) { inst.Record(new InactiveServerTransportClosedEvent(node.ToString())); } }
/// <summary> /// Create event from exception instance /// </summary> public static void Record(IInstrumentation inst, Exception error) { if (inst != null && inst.Enabled) { inst.Record(new ExceptionEvent(error)); } }
public static void Happened(IInstrumentation inst) { if (inst != null && inst.Enabled) { inst.Record(new CallSlotNotFoundErrorEvent()); } }
/// <summary> /// Create event from exception instance as of utcTime /// </summary> public static void Record(IInstrumentation inst, string source, Exception error, DateTime utcTime) { if (inst != null && inst.Enabled) { inst.Record(new ExceptionEvent(source, error, utcTime)); } }
public static void Happened(IInstrumentation inst, Node node) { if (inst != null && inst.Enabled) { inst.Record(new ClientDeserializationErrorEvent(node.ToString())); } }
public static void Happened(IInstrumentation inst, string scope, string seq) { if (inst != null && inst.Enabled) { inst.Record(new AllocBlockRequestedEvent("{0}::{1}".Args(scope, seq))); } }
protected override void DoDumpStats(IInstrumentation instr, DateTime utcNow) { instr.Record(new Instrumentation.EnqueueCalls(Interlocked.Exchange(ref m_stat_EnqueueCalls, 0))); m_stat_EnqueueTodoCount.SnapshotAllLongsInto <Instrumentation.EnqueueTodoCount>(instr, 0); instr.Record(new Instrumentation.QueueThreadSpins(Interlocked.Exchange(ref m_stat_QueueThreadSpins, 0))); m_stat_ProcessOneQueueCount.SnapshotAllLongsInto <Instrumentation.ProcessOneQueueCount>(instr, 0); m_stat_MergedTodoCount.SnapshotAllLongsInto <Instrumentation.MergedTodoCount>(instr, 0); m_stat_FetchedTodoCount.SnapshotAllLongsInto <Instrumentation.FetchedTodoCount>(instr, 0); m_stat_ProcessedTodoCount.SnapshotAllLongsInto <Instrumentation.ProcessedTodoCount>(instr, 0); m_stat_PutTodoCount.SnapshotAllLongsInto <Instrumentation.PutTodoCount>(instr, 0); m_stat_UpdateTodoCount.SnapshotAllLongsInto <Instrumentation.UpdateTodoCount>(instr, 0); m_stat_CompletedTodoCount.SnapshotAllLongsInto <Instrumentation.CompletedTodoCount>(instr, 0); m_stat_CompletedOkTodoCount.SnapshotAllLongsInto <Instrumentation.CompletedOkTodoCount>(instr, 0); m_stat_CompletedErrorTodoCount.SnapshotAllLongsInto <Instrumentation.CompletedErrorTodoCount>(instr, 0); m_stat_QueueOperationErrorCount.SnapshotAllLongsInto <Instrumentation.QueueOperationErrorCount>(instr, 0); m_stat_TodoDuplicationCount.SnapshotAllLongsInto <Instrumentation.TodoDuplicationCount>(instr, 0); }
/// <summary> /// Emits the Api latency reading and ApiCallEvent /// </summary> public static void EmitApiCall(IInstrumentation inst, string ctxName, string uri, long msLatency, bool emitEvent = true) { if (inst == null || !inst.Enabled) { return; } var src = $"{ctxName}::{uri}"; var datum = new ApiLatency(src, msLatency); inst.Record(datum); datum = new ApiLatency(UNSPECIFIED_SOURCE, msLatency);//general inst.Record(datum); if (emitEvent) { inst.Record(new ApiCallEvent(src)); inst.Record(new ApiCallEvent(UNSPECIFIED_SOURCE)); } }