public void Emit(Span span) { var ms = new MemoryStream(); _spanSerializer.SerializeTo(ms, span); _dispatcher.Add(new EventData(ms.ToArray())); }
private void LogSpan(Span span) { var memoryStream = new MemoryStream(); _spanSerializer.SerializeTo(memoryStream, span); var serializedSpan = memoryStream.ToArray(); _spanSender.Send(serializedSpan); Statistics.UpdateSpanSent(); Statistics.UpdateSpanSentBytes(serializedSpan.Length); }
public void Report(Span span) { byte[] serializedSpan = null; using (var memoryStream = new MemoryStream()) { _spanSerializer.SerializeTo(memoryStream, span); serializedSpan = memoryStream.ToArray(); } _sender.Send(serializedSpan); _statistics.UpdateSpanSent(); _statistics.UpdateSpanSentBytes(serializedSpan.Length); }