send(data) {
    const spans = data?.spans?.length || 1
    this._writable = this.stream.write(data)
    this._metrics.getOrCreateMetric(NAMES.SENT).incrementCallCount(spans)

    // false indicates the stream has reached the highWaterMark
    // and future writes should be avoided until drained. written items,
    // including the one that returned false, will still be buffered.
    if (!this._writable) {
      logger.trace('Stream is not writable, adding a drain listener to flush queue when it is writable.')
      const waitDrainStart = Date.now()
      const onDrain = this.drain.bind(this, waitDrainStart)
      this.stream.once('drain', onDrain)
    }
  }
Sends the data(spans or span) over the stream. Spans are only sent here if the stream is
 in a writable state. If the stream becomes unwritable after sending the
 span, a drain event handler is setup to continue writing when possible.

@param {*} data spans or span