Skip to content

Commit bf2f4f9

Browse files
authored
feat: add possibility to customize the User-Agent HTTP header (#371)
1 parent d866e4d commit bf2f4f9

File tree

10 files changed

+157
-69
lines changed

10 files changed

+157
-69
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
### Features
44
1. [#367](https://github.com/influxdata/influxdb-client-java/pull/367): Add HTTP status code to detail message of `InfluxException`
55
1. [#367](https://github.com/influxdata/influxdb-client-java/pull/367): Add `GatewayTimeoutException` for HTTP status code 504
6+
1. [#371](https://github.com/influxdata/influxdb-client-java/pull/371): Add possibility to customize the `User-Agent` HTTP header
67

78
### CI
89
1. [#369](https://github.com/influxdata/influxdb-client-java/pull/369): Add JDK 18 to CI pipeline

client-kotlin/README.md

Lines changed: 23 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -179,17 +179,18 @@ A client can be configured via configuration file. The configuration file has to
179179

180180
The following options are supported:
181181

182-
| Property name | default | description |
183-
|--------------------------|------------|------------------------------------------------------------|
184-
| influx2.url | - | the url to connect to InfluxDB |
185-
| influx2.org | - | default destination organization for writes and queries |
186-
| influx2.bucket | - | default destination bucket for writes |
187-
| influx2.token | - | the token to use for the authorization |
188-
| influx2.logLevel | NONE | rest client verbosity level |
189-
| influx2.readTimeout | 10000 ms | read timeout |
190-
| influx2.writeTimeout | 10000 ms | write timeout |
191-
| influx2.connectTimeout | 10000 ms | socket timeout |
192-
| influx2.precision | NS | default precision for unix timestamps in the line protocol |
182+
| Property name | default | description |
183+
|------------------------|------------|------------------------------------------------------------|
184+
| influx2.url | - | the url to connect to InfluxDB |
185+
| influx2.org | - | default destination organization for writes and queries |
186+
| influx2.bucket | - | default destination bucket for writes |
187+
| influx2.token | - | the token to use for the authorization |
188+
| influx2.logLevel | NONE | rest client verbosity level |
189+
| influx2.readTimeout | 10000 ms | read timeout |
190+
| influx2.writeTimeout | 10000 ms | write timeout |
191+
| influx2.connectTimeout | 10000 ms | socket timeout |
192+
| influx2.precision | NS | default precision for unix timestamps in the line protocol |
193+
| influx2.clientType | - | to customize the User-Agent HTTP header |
193194

194195
The `influx2.readTimeout`, `influx2.writeTimeout` and `influx2.connectTimeout` supports `ms`, `s` and `m` as unit. Default is milliseconds.
195196

@@ -223,16 +224,17 @@ val influxDBClient = InfluxDBClientKotlinFactory
223224
```
224225
The following options are supported:
225226

226-
| Property name | default | description |
227-
|------------------|------------|------------------------------------------------------------|
228-
| org | - | default destination organization for writes and queries |
229-
| bucket | - | default destination bucket for writes |
230-
| token | - | the token to use for the authorization |
231-
| logLevel | NONE | rest client verbosity level |
232-
| readTimeout | 10000 ms | read timeout |
233-
| writeTimeout | 10000 ms | write timeout |
234-
| connectTimeout | 10000 ms | socket timeout |
235-
| precision | NS | default precision for unix timestamps in the line protocol |
227+
| Property name | default | description |
228+
|------------------|-----------|------------------------------------------------------------|
229+
| org | - | default destination organization for writes and queries |
230+
| bucket | - | default destination bucket for writes |
231+
| token | - | the token to use for the authorization |
232+
| logLevel | NONE | rest client verbosity level |
233+
| readTimeout | 10000 ms | read timeout |
234+
| writeTimeout | 10000 ms | write timeout |
235+
| connectTimeout | 10000 ms | socket timeout |
236+
| precision | NS | default precision for unix timestamps in the line protocol |
237+
| clientType | - | to customize the User-Agent HTTP header |
236238

237239
The `readTimeout`, `writeTimeout` and `connectTimeout` supports `ms`, `s` and `m` as unit. Default is milliseconds.
238240

client-reactive/README.md

Lines changed: 23 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -302,17 +302,18 @@ A client can be configured via configuration file. The configuration file has to
302302

303303
The following options are supported:
304304

305-
| Property name | default | description |
306-
|--------------------------|------------|------------------------------------------------------------|
307-
| influx2.url | - | the url to connect to InfluxDB |
308-
| influx2.org | - | default destination organization for writes and queries |
309-
| influx2.bucket | - | default destination bucket for writes |
310-
| influx2.token | - | the token to use for the authorization |
311-
| influx2.logLevel | NONE | rest client verbosity level |
312-
| influx2.readTimeout | 10000 ms | read timeout |
313-
| influx2.writeTimeout | 10000 ms | write timeout |
314-
| influx2.connectTimeout | 10000 ms | socket timeout |
315-
| influx2.precision | NS | default precision for unix timestamps in the line protocol |
305+
| Property name | default | description |
306+
|------------------------|-----------|------------------------------------------------------------|
307+
| influx2.url | - | the url to connect to InfluxDB |
308+
| influx2.org | - | default destination organization for writes and queries |
309+
| influx2.bucket | - | default destination bucket for writes |
310+
| influx2.token | - | the token to use for the authorization |
311+
| influx2.logLevel | NONE | rest client verbosity level |
312+
| influx2.readTimeout | 10000 ms | read timeout |
313+
| influx2.writeTimeout | 10000 ms | write timeout |
314+
| influx2.connectTimeout | 10000 ms | socket timeout |
315+
| influx2.precision | NS | default precision for unix timestamps in the line protocol |
316+
| influx2.clientType | - | to customize the User-Agent HTTP header |
316317

317318
The `influx2.readTimeout`, `influx2.writeTimeout` and `influx2.connectTimeout` supports `ms`, `s` and `m` as unit. Default is milliseconds.
318319

@@ -346,16 +347,17 @@ InfluxDBClientReactive influxDBClient = InfluxDBClientReactiveFactory
346347
```
347348
The following options are supported:
348349

349-
| Property name | default | description |
350-
|------------------|------------|------------------------------------------------------------|
351-
| org | - | default destination organization for writes and queries |
352-
| bucket | - | default destination bucket for writes |
353-
| token | - | the token to use for the authorization |
354-
| logLevel | NONE | rest client verbosity level |
355-
| readTimeout | 10000 ms | read timeout |
356-
| writeTimeout | 10000 ms | write timeout |
357-
| connectTimeout | 10000 ms | socket timeout |
358-
| precision | NS | default precision for unix timestamps in the line protocol |
350+
| Property name | default | description |
351+
|----------------|------------|------------------------------------------------------------|
352+
| org | - | default destination organization for writes and queries |
353+
| bucket | - | default destination bucket for writes |
354+
| token | - | the token to use for the authorization |
355+
| logLevel | NONE | rest client verbosity level |
356+
| readTimeout | 10000 ms | read timeout |
357+
| writeTimeout | 10000 ms | write timeout |
358+
| connectTimeout | 10000 ms | socket timeout |
359+
| precision | NS | default precision for unix timestamps in the line protocol |
360+
| clientType | - | to customize the User-Agent HTTP header |
359361

360362
The `readTimeout`, `writeTimeout` and `connectTimeout` supports `ms`, `s` and `m` as unit. Default is milliseconds.
361363

client-scala/README.md

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -130,6 +130,7 @@ The following options are supported:
130130
| influx2.writeTimeout | 10000 ms | write timeout |
131131
| influx2.connectTimeout | 10000 ms | socket timeout |
132132
| influx2.precision | NS | default precision for unix timestamps in the line protocol |
133+
| influx2.clientType | - | to customize the User-Agent HTTP header |
133134

134135
The `influx2.readTimeout`, `influx2.writeTimeout` and `influx2.connectTimeout` supports `ms`, `s` and `m` as unit. Default is milliseconds.
135136

@@ -163,16 +164,17 @@ val influxDBClient = InfluxDBClientScalaFactory
163164
```
164165
The following options are supported:
165166

166-
| Property name | default | description |
167-
|------------------|------------|------------------------------------------------------------|
168-
| org | - | default destination organization for writes and queries |
169-
| bucket | - | default destination bucket for writes |
170-
| token | - | the token to use for the authorization |
171-
| logLevel | NONE | rest client verbosity level |
172-
| readTimeout | 10000 ms | read timeout |
173-
| writeTimeout | 10000 ms | write timeout |
174-
| connectTimeout | 10000 ms | socket timeout |
175-
| precision | NS | default precision for unix timestamps in the line protocol |
167+
| Property name | default | description |
168+
|----------------|----------|------------------------------------------------------------|
169+
| org | - | default destination organization for writes and queries |
170+
| bucket | - | default destination bucket for writes |
171+
| token | - | the token to use for the authorization |
172+
| logLevel | NONE | rest client verbosity level |
173+
| readTimeout | 10000 ms | read timeout |
174+
| writeTimeout | 10000 ms | write timeout |
175+
| connectTimeout | 10000 ms | socket timeout |
176+
| precision | NS | default precision for unix timestamps in the line protocol |
177+
| clientType | - | to customize the User-Agent HTTP header |
176178

177179
The `readTimeout`, `writeTimeout` and `connectTimeout` supports `ms`, `s` and `m` as unit. Default is milliseconds.
178180

client/README.md

Lines changed: 13 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1039,17 +1039,18 @@ A client can be configured via configuration file. The configuration file has to
10391039

10401040
The following options are supported:
10411041

1042-
| Property name | default | description |
1043-
|--------------------------|------------|------------------------------------------------------------|
1044-
| influx2.url | - | the url to connect to InfluxDB |
1045-
| influx2.org | - | default destination organization for writes and queries |
1046-
| influx2.bucket | - | default destination bucket for writes |
1047-
| influx2.token | - | the token to use for the authorization |
1048-
| influx2.logLevel | NONE | rest client verbosity level |
1049-
| influx2.readTimeout | 10000 ms | read timeout |
1050-
| influx2.writeTimeout | 10000 ms | write timeout |
1051-
| influx2.connectTimeout | 10000 ms | socket timeout |
1052-
| influx2.precision | NS | default precision for unix timestamps in the line protocol |
1042+
| Property name | default | description |
1043+
|-------------------------|------------|------------------------------------------------------------|
1044+
| influx2.url | - | the url to connect to InfluxDB |
1045+
| influx2.org | - | default destination organization for writes and queries |
1046+
| influx2.bucket | - | default destination bucket for writes |
1047+
| influx2.token | - | the token to use for the authorization |
1048+
| influx2.logLevel | NONE | rest client verbosity level |
1049+
| influx2.readTimeout | 10000 ms | read timeout |
1050+
| influx2.writeTimeout | 10000 ms | write timeout |
1051+
| influx2.connectTimeout | 10000 ms | socket timeout |
1052+
| influx2.precision | NS | default precision for unix timestamps in the line protocol |
1053+
| influx2.clientType | - | to customize the User-Agent HTTP header |
10531054

10541055
The `influx2.readTimeout`, `influx2.writeTimeout` and `influx2.connectTimeout` supports `ms`, `s` and `m` as unit. Default is milliseconds.
10551056

@@ -1093,6 +1094,7 @@ The following options are supported:
10931094
| writeTimeout | 10000 ms | write timeout |
10941095
| connectTimeout | 10000 ms | socket timeout |
10951096
| precision | NS | default precision for unix timestamps in the line protocol |
1097+
| clientType | - | to customize the User-Agent HTTP header |
10961098

10971099
The `readTimeout`, `writeTimeout` and `connectTimeout` supports `ms`, `s` and `m` as unit. Default is milliseconds.
10981100

0 commit comments

Comments
 (0)