Optional
defaultdefault tags
const client = new InfluxDBClient({
host: 'https://eu-west-1-1.aws.cloud2.influxdata.com',
writeOptions: {
defaultTags: {
device: 'nrdc-th-52-fd889e03',
},
},
})
const p = Point.measurement('measurement').setField('num', 3)
// this will write point with device=device-a tag
await client.write(p, 'my-db')
const client = new InfluxDBClient({
host: 'https://eu-west-1-1.aws.cloud2.influxdata.com',
})
const defaultTags = {
device: 'rpi5_0_0599e8d7',
}
const p = Point.measurement('measurement').setField('num', 3)
// this will write point with device=device-a tag
await client.write(p, 'my-db', undefined, {defaultTags})
Optional
gzipWhen specified, write bodies larger than the threshold are gzipped
Optional
headersHTTP headers that will be sent with every write request
Optional
precisionPrecision to use in writes for timestamp. default ns
Options used by InfluxDBClient.default.write .
Example: WriteOptions in write call