influxdata / influxdb-java

Java client for InfluxDB
MIT License
1.19k stars 478 forks source link

How to Not Add Default Options/Params to Write Requests #902

Open weihao opened 1 year ago

weihao commented 1 year ago

Sample code

        Point build = Point.measurement("test")
                .addField("metrics", 0.23)
                .tag("tag", "tag_a")
                .build();
        influxDB.write(build);

        influxDB.flush();

Real

Request{method=POST, url=https://influx-prod-06-prod-us-central-0.grafana.net/api/v1/push/influx/write?rp=autogen&precision=n&consistency=one}

Expected

Request{method=POST, url=https://influx-prod-06-prod-us-central-0.grafana.net/api/v1/push/influx/write}

I am using default options and I noticed the default params will automatically append to outgoing request when writing line protocol. How can I disable it? I can't seem to set a no time unit.