_maybeRecordErrorMetrics(errorTrace, transaction) {
    const isExpectedError = errorTrace[4].intrinsics['error.expected'] === true

    if (isExpectedError) {
      this.metrics.getOrCreateMetric(NAMES.ERRORS.EXPECTED).incrementCallCount()
    } else {
      this.metrics.getOrCreateMetric(NAMES.ERRORS.ALL).incrementCallCount()

      if (transaction) {
        if (transaction.isWeb()) {
          this.metrics.getOrCreateMetric(NAMES.ERRORS.WEB).incrementCallCount()
        } else {
          this.metrics.getOrCreateMetric(NAMES.ERRORS.OTHER).incrementCallCount()
        }
      }
    }
  }
Helper method for recording metrics about errors depending on the type of error that happened

@param {Array} errorTrace list of error information
@param {Transaction} transaction the transaction associated with the trace