Skip to content

Commit

Permalink
fix comments
Browse files Browse the repository at this point in the history
  • Loading branch information
dmitryk-dk committed Sep 12, 2024
1 parent 11b2fb4 commit bc2dee5
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
Thanks to @yincongcyincong for [the pull request](https://github.com/VictoriaMetrics/victorialogs-datasource/pull/69).

* BUGFIX: correctly pass time range filter when querying variable values. Before, time filter wasn't applied for `/field_values` and `/field_names` API calls. See [this](https://github.com/VictoriaMetrics/victorialogs-datasource/issues/71) and [this](https://github.com/VictoriaMetrics/victorialogs-datasource/issues/72) issues.
* BUGFIX: fix the issue of collecting labels in different log lines. Removed duplicated labels from previous log lines. See [this issue](https://github.com/VictoriaMetrics/victorialogs-datasource/issues/60).
* BUGFIX: fix the issue with displaying incorrect subfields when requesting logs with different set of fields. See [this issue](https://github.com/VictoriaMetrics/victorialogs-datasource/issues/60).

## v0.4.0

Expand Down
5 changes: 2 additions & 3 deletions pkg/plugin/response.go
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,6 @@ func parseStreamResponse(reader io.Reader) backend.DataResponse {
lineField := data.NewFieldFromFieldType(data.FieldTypeString, 0)
lineField.Name = gLineField

labels := data.Labels{}

scanner := bufio.NewScanner(reader)

for scanner.Scan() {
Expand All @@ -63,6 +61,8 @@ func parseStreamResponse(reader io.Reader) backend.DataResponse {
}
timeFd.Append(getTime)
}

labels := data.Labels{}
if value.Exists(streamField) {
stream := value.GetStringBytes(streamField)
expr, err := metricsql.Parse(string(stream))
Expand Down Expand Up @@ -98,7 +98,6 @@ func parseStreamResponse(reader io.Reader) backend.DataResponse {
return newResponseError(err, backend.StatusInternal)
}
labelsField.Append(d)
labels = data.Labels{}
}

// Grafana expects lineFields to be always non-empty.
Expand Down

0 comments on commit bc2dee5

Please sign in to comment.