multiple refactors in Influx integration logic