influxdata / influxdata/influxdb-java

How to Not Add Default Options/Params to Write Requests

Open
#902 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Java
Stars
1.2k
Forks
469
PR merge metrics
No merged PRs in 30d

Description

## Sample code
```java
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.

Contributor guide

No contributing guide indexed for this repository

Research direction

Reproduce the behavior with the sample Java code and compare the actual request URL with the expected URL. Trace how default write options are assembled into the outgoing request, then verify that omitting options produces a request without those query parameters.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
databases
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.