func (c *UDPCollector) send(s *zipkin.Span) error { t := thrift.NewTMemoryBuffer() p := thrift.NewTBinaryProtocolTransport(t) err := s.Write(p) if err != nil { return err } _, err = c.conn.WriteToUDP(t.Buffer.Bytes(), c.addr) return err }
// Collect will serialize and send a zipkin.Span to the configured Scribe // endpoint func (c *ScribeCollector) Collect(s *zipkin.Span) { t := thrift.NewTMemoryBuffer() p := thrift.NewTBinaryProtocolTransport(t) err := s.Write(p) if err != nil { logger.Errore(err) } else { logger.Errore(c.CollectSerialized(t.Buffer.Bytes())) } }