code: func (s *Segment) flush() {
  	b, _ := json.Marshal(s)
  	// append so we make only one call to Write to be goroutine-safe
  	s.conn.Write(append([]byte(udpHeader), b...))
  }
docs: // flush sends the segment to the AWS X-Ray daemon.