influxdata / influxdata/kapacitor
[Bug] kapacitorLoopback().measurement property not working
- Dominant language
- Go
- Stars
- 2.4k
- Forks
- 479
- Avg merge
- 4d 16h
- Merged PRs (30d)
- 4
Description
After kapacitor upgrade from 1.3.3 to 1.4 the property `.measurement('some_name')` of kapacitorLoopbackNode have no effect on produced stream.
generating stream:
```
var cpu = batch
|query('SELECT mean("usage_idle") FROM "telegraf"."ret_30w"."cpu" WHERE "cpu"=\'cpu-total\'')
.period(1m)
.every(10s)
.groupBy('host')
|kapacitorLoopback()
.database('loop')
.retentionPolicy('loop')
.measurement('some_name')
```
listening stream:
```
var cpu_loop = stream
|from()
.database('loop')
.retentionPolicy('loop')
.groupByMeasurement()
.groupBy([*])
|httpOut('loop')
```
1.3.3 httpOut
```json
{
"series": [
{
"name": "some_name",
"tags": {
"host": "srv5-lingles"
},
"columns": [
"time",
"mean"
],
"values": [
[
"2018-01-31T07:55:38.685484007Z",
97.013245
]
]
}
]
}
```
1.4.0 httpOut
```json
{
"series": [
{
"name": "cpu",
"tags": {
"host": "srv5-lingles"
},
"columns": [
"time",
"mean"
],
"values": [
[
"2018-01-31T07:55:32.974378933Z",
97.013245
]
]
}
]
}
```
Contributor guide
Research direction
Begin at the kapacitorLoopback() entry point and trace how .measurement('some_name') is propagated to the produced stream after the 1.4 upgrade. Reproduce the provided batch and stream pipeline, then verify that httpOut reports the measurement as some_name rather than cpu.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go
- Domain
- stream-processing
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 42/100