private void HandleSpanStart(ApmSpanScopeParams prms) { if (RabbitMqLogger.IsEnabled(Constants.Events.SpanStart)) { RabbitMqLogger.Write(Constants.Events.SpanStart, RabbitMqEvent <ApmSpanScopeParams> .Success(prms)); } }
private void HandleSpanEnd(TimeSpan duration, ApmSpanScopeParams prms) { if (RabbitMqLogger.IsEnabled(Constants.Events.SpanEnd)) { RabbitMqLogger.Write(Constants.Events.SpanEnd, RabbitMqDurationEvent <ApmSpanScopeParams> .Success(duration, prms)); } }
public ApmSpanScope(string command, EventingBasicConsumerApm consumer) { _Consumer = consumer; _Params = new ApmSpanScopeParams(command); _StopWatch = Stopwatch.StartNew(); _Consumer.HandleSpanStart(_Params); }