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