From 56e2df7572819e9bdef9d47394f87a2626b5c322 Mon Sep 17 00:00:00 2001 From: Robert Fratto Date: Fri, 27 Oct 2023 12:37:15 -0400 Subject: [PATCH] bump river to v0.3.0 (#5621) Closes #5615 --- CHANGELOG.md | 21 ++++++++++++++----- .../config-language/expressions/operators.md | 6 ++++++ go.mod | 2 +- go.sum | 4 ++-- 4 files changed, 25 insertions(+), 8 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index ad62c5ea7ad7..ef4d71f93998 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -42,7 +42,15 @@ Main (unreleased) - Added a new `stage.eventlogmessage` stage to `loki.process` component which allows to extract data from Windows Event Log. (@thampiotr) -- Update version of River to support raw strings in flow using a backtick. (@erikbaranowski) +- Update version of River: + + - River now supports raw strings, which are strings surrounded by backticks + instead of double quotes. Raw strings can span multiple lines, and do not + support any escape sequences. (@erikbaranowski) + + - River now permits using `[]` to access non-existent keys in an object. + When this is done, the access evaluates to `null`, such that `{}["foo"] + == null` is true. (@rfratto) - Added support for python profiling to `pyroscope.ebpf` component. (@korniltsev) @@ -63,10 +71,13 @@ Main (unreleased) - Fix validation issue with ServiceMonitors when scrape timeout is greater than interval. (@captncraig) - Static mode's spanmetrics processor will now prune histograms when the dimension cache is pruned. - Dimension cache was always pruned but histograms were not being pruned. This caused metric series + Dimension cache was always pruned but histograms were not being pruned. This caused metric series created by the spanmetrics processor to grow unbounded. Only static mode has this issue. Flow mode's `otelcol.connector.spanmetrics` does not have this bug. (@nijave) +- Fixed a bug in River where passing a non-string key to an object (such as + `{}[true]`) would incorrectly report that a number type was expected instead. (@rfratto) + ### Enhancements - The `loki.write` WAL now has snappy compression enabled by default. (@thepalbi) @@ -78,7 +89,7 @@ Main (unreleased) - The `loki.source.docker` component now allows connecting to Docker daemons over HTTP(S) and setting up TLS credentials. (@tpaschalis) -- Added an `add_metric_suffixes` option to `otelcol.exporter.prometheus` in flow mode, +- Added an `add_metric_suffixes` option to `otelcol.exporter.prometheus` in flow mode, which configures whether to add type and unit suffixes to metrics names. (@mar4uk) v0.37.3 (2023-10-26) @@ -102,9 +113,9 @@ v0.37.3 (2023-10-26) - Upgrade OpenTelemetry Collector packages to version 0.87 (@ptodev): - `otelcol.receiver.kafka` has a new `header_extraction` block to extract headers from Kafka records. - - `otelcol.receiver.kafka` has a new `version` argument to change the version of + - `otelcol.receiver.kafka` has a new `version` argument to change the version of the SASL Protocol for SASL authentication. - + v0.37.2 (2023-10-16) ----------------- diff --git a/docs/sources/flow/config-language/expressions/operators.md b/docs/sources/flow/config-language/expressions/operators.md index ddc4e0e61281..c9c724952d81 100644 --- a/docs/sources/flow/config-language/expressions/operators.md +++ b/docs/sources/flow/config-language/expressions/operators.md @@ -115,3 +115,9 @@ arr[1] obj.app local.file.token.content ``` + +If the `[ ]` operator is used to access a member of an object where the member +doesn't exist, the resulting value is `null`. + +If the `.` operator is used to access a named member of an object where the +named member doesn't exist, an error is generated. diff --git a/go.mod b/go.mod index 264677166275..dc79338885c9 100644 --- a/go.mod +++ b/go.mod @@ -61,7 +61,7 @@ require ( github.com/grafana/pyroscope/api v0.2.0 github.com/grafana/pyroscope/ebpf v0.3.0 github.com/grafana/regexp v0.0.0-20221123153739-15dc172cd2db - github.com/grafana/river v0.2.0 + github.com/grafana/river v0.3.0 github.com/grafana/snowflake-prometheus-exporter v0.0.0-20221213150626-862cad8e9538 github.com/grafana/tail v0.0.0-20230510142333-77b18831edf0 github.com/grafana/vmware_exporter v0.0.4-beta diff --git a/go.sum b/go.sum index 428230866714..b83c6af03ba5 100644 --- a/go.sum +++ b/go.sum @@ -1080,8 +1080,8 @@ github.com/grafana/pyroscope/ebpf v0.3.0 h1:7J24qd5ul786ZNDpgN8oIDbuBEXX2L829BjN github.com/grafana/pyroscope/ebpf v0.3.0/go.mod h1:f9gfqjtpxYs/1t7L2HskrR5kQMH64gclaCYdtZ1unKo= github.com/grafana/regexp v0.0.0-20221123153739-15dc172cd2db h1:7aN5cccjIqCLTzedH7MZzRZt5/lsAHch6Z3L2ZGn5FA= github.com/grafana/regexp v0.0.0-20221123153739-15dc172cd2db/go.mod h1:M5qHK+eWfAv8VR/265dIuEpL3fNfeC21tXXp9itM24A= -github.com/grafana/river v0.2.0 h1:VgBe/+DdYviJ1cYGUCcA8Og0FhSTjN7jdHCe/+OIFV0= -github.com/grafana/river v0.2.0/go.mod h1:icSidCSHYXJUYy6TjGAi/D+X7FsP7Gc7cxvBUIwYMmY= +github.com/grafana/river v0.3.0 h1:6TsaR/vkkcppUM9I0muGbPIUedCtpPu6OWreE5+CE6g= +github.com/grafana/river v0.3.0/go.mod h1:icSidCSHYXJUYy6TjGAi/D+X7FsP7Gc7cxvBUIwYMmY= github.com/grafana/smimesign v0.2.1-0.20220408144937-2a5adf3481d3 h1:UPkAxuhlAcRmJT3/qd34OMTl+ZU7BLLfOO2+NXBlJpY= github.com/grafana/smimesign v0.2.1-0.20220408144937-2a5adf3481d3/go.mod h1:iZiiwNT4HbtGRVqCQu7uJPEZCuEE5sfSSttcnePkDl4= github.com/grafana/snowflake-prometheus-exporter v0.0.0-20221213150626-862cad8e9538 h1:tkT0yha3JzB5S5VNjfY4lT0cJAe20pU8XGt3Nuq73rM=