Skip to content

Commit

Permalink
Update more instances of River
Browse files Browse the repository at this point in the history
  • Loading branch information
clayton-cornell committed Mar 26, 2024
1 parent 2382d3b commit d5fdb22
Show file tree
Hide file tree
Showing 23 changed files with 63 additions and 62 deletions.
2 changes: 1 addition & 1 deletion docs/sources/about.md
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ prometheus.remote_write "default" {
The {{< param "PRODUCT_NAME" >}} [configuration generator][] helps you get a head start on creating {{< param "PRODUCT_NAME" >}} configurations.

{{< admonition type="note" >}}
This feature is experimental, and it doesn't support all River components.
This feature is experimental, and it doesn't support all {{< param "PRODUCT_NAME" >}} components.
{{< /admonition >}}

## Next steps
Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
---
canonical: https://grafana.com/docs/alloy/latest/concepts/config-language/expressions/types_and_values/
description: Learn about the River types and values
description: Learn about the {{< param "PRODUCT_NAME" >}} syntax types and values
title: Types and values
weight: 100
---

# Types and values

River uses the following types for its values:
The {{< param "PRODUCT_NAME" >}} syntax uses the following types for its values:

* `number`: Any numeric value, like `3` or `3.14`.
* `string`: A sequence of Unicode characters representing text, like `"Hello, world!"`.
Expand Down Expand Up @@ -42,7 +42,7 @@ In addition to the preceding types, the [component reference][] documentation us

## Numbers

River handles integers, unsigned integers, and floating-point values as a single 'number' type, simplifying writing and reading River configuration files.
The {{< param "PRODUCT_NAME" >}} syntax handles integers, unsigned integers, and floating-point values as a single 'number' type, simplifying writing and reading {{< param "PRODUCT_NAME" >}} configuration files.

```river
3 == 3.00 // true
Expand Down
4 changes: 2 additions & 2 deletions docs/sources/get-started/install/windows.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ To do a standard graphical install of {{< param "PRODUCT_NAME" >}} on Windows, p

1. Double-click on `alloy-installer.exe` to install {{< param "PRODUCT_NAME" >}}.

{{< param "PRODUCT_NAME" >}} is installed into the default directory `C:\Program Files\Grafana Alloy`.
{{< param "PRODUCT_NAME" >}} is installed into the default directory `C:\Program Files\Grafana\Alloy`.

## Silent install

Expand Down Expand Up @@ -64,7 +64,7 @@ To do a silent install of {{< param "PRODUCT_NAME" >}} on Windows, perform the f

## Uninstall

You can uninstall {{< param "PRODUCT_NAME" >}} with Windows Remove Programs or `C:\Program Files\Grafana Alloy\uninstaller.exe`.
You can uninstall {{< param "PRODUCT_NAME" >}} with Windows Remove Programs or `C:\Program Files\Grafana\Alloy\uninstaller.exe`.
Uninstalling {{< param "PRODUCT_NAME" >}} stops the service and removes it from disk.
This includes any configuration files in the installation directory.

Expand Down
4 changes: 2 additions & 2 deletions docs/sources/get-started/run/windows.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,11 @@ To verify that {{< param "PRODUCT_NAME" >}} is running as a Windows Service:

1. Type: `services.msc` and click **OK**.

1. Scroll down to find the **{{< param "FULL_PRODUCT_NAME" >}}** service and verify that the **Status** is **Running**.
1. Scroll down to find the **{{< param "PRODUCT_NAME" >}}** service and verify that the **Status** is **Running**.

## View {{% param "PRODUCT_NAME" %}} logs

When running on Windows, {{< param "PRODUCT_NAME" >}} writes its logs to Windows Event Logs with an event source name of **{{< param "FULL_PRODUCT_NAME" >}}**.
When running on Windows, {{< param "PRODUCT_NAME" >}} writes its logs to Windows Event Logs with an event source name of **{{< param "PRODUCT_NAME" >}}**.

To view the logs, perform the following steps:

Expand Down
2 changes: 1 addition & 1 deletion docs/sources/reference/cli/run.md
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ The current state of a clustered {{< param "PRODUCT_NAME" >}} is shown on the cl

## Configuration conversion (beta)

When you use the `--config.format` command-line argument with a value other than `alloy`, {{< param "PRODUCT_NAME" >}} converts the configuration file from the source format to River and immediately starts running with the new configuration.
When you use the `--config.format` command-line argument with a value other than `alloy`, {{< param "PRODUCT_NAME" >}} converts the configuration file from the source format to {{< param "PRODUCT_NAME" >}} and immediately starts running with the new configuration.
This conversion uses the converter API described in the [alloy convert][] docs.

If you include the `--config.bypass-conversion-errors` command-line argument,
Expand Down
4 changes: 2 additions & 2 deletions docs/sources/reference/components/loki.process.md
Original file line number Diff line number Diff line change
Expand Up @@ -926,7 +926,7 @@ The `expression` field needs to be a RE2 regex string.
Every matched capture group is added to the extracted map, so it must be named like: `(?P<name>re)`.
The name of the capture group is then used as the key in the extracted map for the matched value.

Because of how River strings work, any backslashes in `expression` must be escaped with a double backslash; for example `"\\w"` or `"\\S+"`.
Because of how {{< param "PRODUCT_NAME" >}} syntax strings work, any backslashes in `expression` must be escaped with a double backslash; for example `"\\w"` or `"\\S+"`.

If the `source` is empty or missing, then the stage parses the log line itself.
If it's set, the stage parses a previously extracted value with the same name.
Expand Down Expand Up @@ -995,7 +995,7 @@ The replaced value is assigned back to the `source` key.
The `expression` must be a valid RE2 regex.
Every named capture group `(?P<name>re)` is set into the extracted map with its name.

Because of how River treats backslashes in double-quoted strings, note that all backslashes in a regex expression must be escaped like `"\\w*"`.
Because of how {{< param "PRODUCT_NAME" >}} syntax treats backslashes in double-quoted strings, note that all backslashes in a regex expression must be escaped like `"\\w*"`.

Let's see how this works with the following log line and stage. Since `source` is omitted, the replacement occurs on the log line itself.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -622,7 +622,7 @@ This problem can be solved by doing **either** of the following:

- **Recommended approach:** Prior to `otelcol.connector.spanmetrics`, remove all resource attributes from the incoming spans which are not needed by `otelcol.connector.spanmetrics`.

{{< collapse title="Example River configuration to remove unnecessary resource attributes." >}}
{{< collapse title="Example {{< param "PRODUCT_NAME" >}} configuration to remove unnecessary resource attributes." >}}
```river
otelcol.receiver.otlp "default" {
http {}
Expand Down Expand Up @@ -690,7 +690,7 @@ This has the advantage that the resource attributes will be visible as metric la
However, the {{< term "cardinality" >}}cardinality{{< /term >}} of the metrics may be much higher, which could increase the cost of storing and querying them.
The example below uses the [merge_maps][] OTTL function.

{{< collapse title="Example River configuration to add all resource attributes as metric datapoint attributes." >}}
{{< collapse title="Example {{< param "PRODUCT_NAME" >}} configuration to add all resource attributes as metric datapoint attributes." >}}
```river
otelcol.receiver.otlp "default" {
http {}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -296,7 +296,7 @@ otelcol.processor.attributes "default" {
// it will be updated.
//
// Note: The regex pattern is enclosed in backticks instead of quotation marks.
// This constitutes a raw River string, and lets us avoid the need to escape backslash characters.
// This constitutes a raw {{< param "PRODUCT_NAME" >}} syntax string, and lets us avoid the need to escape backslash characters.
action {
key = "example_user_key"
pattern = `\/api\/v1\/document\/(?P<new_user_key>.*)\/update\/(?P<version>.*)$`
Expand Down
12 changes: 6 additions & 6 deletions docs/sources/reference/components/otelcol.processor.filter.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,8 @@ In addition to the [standard OTTL Converter functions][OTTL Converter functions]
* `sum([1, 2, 3, 4]) + (10 / 1) - 1`

{{< admonition type="note" >}}
Raw River strings can be used to write OTTL statements.
For example, the OTTL statement `attributes["grpc"] == true` is written in River as \`attributes["grpc"] == true\`
Raw {{< param "PRODUCT_NAME" >}} syntax strings can be used to write OTTL statements.
For example, the OTTL statement `attributes["grpc"] == true` is written in {{< param "PRODUCT_NAME" >}} syntax as \`attributes["grpc"] == true\`
{{< /admonition >}}

{{< admonition type="note" >}}
Expand Down Expand Up @@ -212,7 +212,7 @@ otelcol.processor.filter "default" {
}
```

Each `"` is [escaped][river-strings] with `\"` inside the River string.
Each `"` is [escaped][river-strings] with `\"` inside the {{< param "PRODUCT_NAME" >}} syntax string.

### Drop metrics based on either of two criteria

Expand Down Expand Up @@ -240,7 +240,7 @@ otelcol.processor.filter "default" {
```


Some values in the River string are [escaped][river-strings]:
Some values in the {{< param "PRODUCT_NAME" >}} syntax string are [escaped][river-strings]:
* `\` is escaped with `\\`
* `"` is escaped with `\"`

Expand Down Expand Up @@ -271,10 +271,10 @@ otelcol.processor.filter "default" {
}
```

Each `"` is [escaped][river-strings] with `\"` inside the River string.
Each `"` is [escaped][river-strings] with `\"` inside the {{< param "PRODUCT_NAME" >}} syntax string.


Some values in the River strings are [escaped][river-strings]:
Some values in the {{< param "PRODUCT_NAME" >}} syntax strings are [escaped][river-strings]:
* `\` is escaped with `\\`
* `"` is escaped with `\"`

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,12 +62,12 @@ Name | Type | Description
* `openshift`
* `kubernetes_node`

`env` is the only detector that is not configured through a River block.
`env` is the only detector that is not configured through a block.
The `env` detector reads resource information from the `OTEL_RESOURCE_ATTRIBUTES` environment variable.
This variable must be in the format `<key1>=<value1>,<key2>=<value2>,...`,
the details of which are currently pending confirmation in the OpenTelemetry specification.

If a detector other than `env` is needed, you can customize it with the relevant River block.
If a detector other than `env` is needed, you can customize it with the relevant block.
For example, you can customize the `ec2` detector with the [ec2][] block.
If you omit the [ec2][] block, the defaults specified in the [ec2][] block documentation are used.

Expand Down Expand Up @@ -786,7 +786,7 @@ otelcol.processor.resourcedetection "default" {

### env and ec2

There is no need to put in an `ec2 {}` River block.
There is no need to put in an `ec2 {}` block.
The `ec2` defaults are applied automatically, as specified in [ec2][].

```river
Expand All @@ -803,7 +803,7 @@ otelcol.processor.resourcedetection "default" {

### ec2 with default resource attributes

There is no need to put in a `ec2 {}` River block.
There is no need to put in a `ec2 {}` block.
The `ec2` defaults are applied automatically, as specified in [ec2][].

```river
Expand Down Expand Up @@ -850,7 +850,7 @@ otelcol.processor.resourcedetection "default" {

This example uses the default `node_from_env_var` option of `K8S_NODE_NAME`.

There is no need to put in a `kubernetes_node {}` River block.
There is no need to put in a `kubernetes_node {}` block.
The `kubernetes_node` defaults are applied automatically, as specified in [kubernetes_node][].

```river
Expand Down
22 changes: 11 additions & 11 deletions docs/sources/reference/components/otelcol.processor.transform.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,15 +38,15 @@ there is also a set of metrics-only functions:
* `sum([1, 2, 3, 4]) + (10 / 1) - 1`

{{< admonition type="note" >}}
There are two ways of inputting strings in River configuration files:
* Using quotation marks ([normal River strings][river-strings]). Characters such as `\` and
There are two ways of inputting strings in {{< param "PRODUCT_NAME" >}} configuration files:
* Using quotation marks ([normal {{< param "PRODUCT_NAME" >}} syntax strings][river-strings]). Characters such as `\` and
`"` must be escaped by preceding them with a `\` character.
* Using backticks ([raw River strings][river-raw-strings]). No characters must be escaped.
* Using backticks ([raw {{< param "PRODUCT_NAME" >}} syntax strings][river-raw-strings]). No characters must be escaped.
However, it's not possible to have backticks inside the string.

For example, the OTTL statement `set(description, "Sum") where type == "Sum"` can be written as:
* A normal River string: `"set(description, \"Sum\") where type == \"Sum\""`.
* A raw River string: ``` `set(description, "Sum") where type == "Sum"` ```.
* A normal {{< param "PRODUCT_NAME" >}} syntax string: `"set(description, \"Sum\") where type == \"Sum\""`.
* A raw {{< param "PRODUCT_NAME" >}} syntax string: ``` `set(description, "Sum") where type == "Sum"` ```.

Raw strings are generally more convenient for writing OTTL statements.

Expand Down Expand Up @@ -301,7 +301,7 @@ otelcol.processor.transform "default" {

Each statement is enclosed in backticks instead of quotation marks.
This constitutes a [raw string][river-raw-strings], and lets us avoid the need to escape
each `"` with a `\"` inside a [normal][river-strings] River string.
each `"` with a `\"` inside a [normal][river-strings] {{< param "PRODUCT_NAME" >}} syntax string.

### Rename a resource attribute

Expand Down Expand Up @@ -351,7 +351,7 @@ otelcol.processor.transform "default" {

Each statement is enclosed in backticks instead of quotation marks.
This constitutes a [raw string][river-raw-strings], and lets us avoid the need to escape
each `"` with a `\"`, and each `\` with a `\\` inside a [normal][river-strings] River string.
each `"` with a `\"`, and each `\` with a `\\` inside a [normal][river-strings] {{< param "PRODUCT_NAME" >}} syntax string.

### Create an attribute from the contents of a log body

Expand All @@ -378,7 +378,7 @@ otelcol.processor.transform "default" {

Each statement is enclosed in backticks instead of quotation marks.
This constitutes a [raw string][river-raw-strings], and lets us avoid the need to escape
each `"` with a `\"` inside a [normal][river-strings] River string.
each `"` with a `\"` inside a [normal][river-strings] {{< param "PRODUCT_NAME" >}} syntax string.

### Combine two attributes

Expand Down Expand Up @@ -406,7 +406,7 @@ otelcol.processor.transform "default" {

Each statement is enclosed in backticks instead of quotation marks.
This constitutes a [raw string][river-raw-strings], and lets us avoid the need to escape
each `"` with a `\"` inside a [normal][river-strings] River string.
each `"` with a `\"` inside a [normal][river-strings] {{< param "PRODUCT_NAME" >}} syntax string.

### Parsing JSON logs

Expand Down Expand Up @@ -458,7 +458,7 @@ otelcol.processor.transform "default" {

Each statement is enclosed in backticks instead of quotation marks.
This constitutes a [raw string][river-raw-strings], and lets us avoid the need to escape
each `"` with a `\"`, and each `\` with a `\\` inside a [normal][river-strings] River string.
each `"` with a `\"`, and each `\` with a `\\` inside a [normal][river-strings] {{< param "PRODUCT_NAME" >}} syntax string.

### Various transformations of attributes and status codes

Expand Down Expand Up @@ -559,7 +559,7 @@ otelcol.exporter.otlp "default" {

Each statement is enclosed in backticks instead of quotation marks.
This constitutes a [raw string][river-raw-strings], and lets us avoid the need to escape
each `"` with a `\"`, and each `\` with a `\\` inside a [normal][river-strings] River string.
each `"` with a `\"`, and each `\` with a `\\` inside a [normal][river-strings] {{< param "PRODUCT_NAME" >}} syntax string.

[river-strings]: ../../../concepts/config-language/expressions/types_and_values/#strings
[river-raw-strings]: ../../../concepts/config-language/expressions/types_and_values/#raw-strings
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ You can use the following arguments to configure the exporter's behavior.
Omitted fields take their default values.

{{< admonition type="note" >}}
Please note that if you are supplying a list of strings for the `extra_filters` argument, any string values within a particular filter string must be enclosed in escaped double quotes. For example, `loadbalancing.googleapis.com:resource.labels.backend_target_name="sample-value"` must be encoded as `"loadbalancing.googleapis.com:resource.labels.backend_target_name=\"sample-value\""` in the River config.
Please note that if you are supplying a list of strings for the `extra_filters` argument, any string values within a particular filter string must be enclosed in escaped double quotes. For example, `loadbalancing.googleapis.com:resource.labels.backend_target_name="sample-value"` must be encoded as `"loadbalancing.googleapis.com:resource.labels.backend_target_name=\"sample-value\""` in the {{< param "PRODUCT_NAME" >}} configuration.
{{< /admonition >}}

| Name | Type | Description | Default | Required |
Expand Down
4 changes: 2 additions & 2 deletions docs/sources/reference/config-blocks/import.git.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,8 @@ You must set the `repository` attribute to a repository address that Git would r
When provided, the `revision` attribute must be set to a valid branch, tag, or commit SHA within the repository.

You must set the `path` attribute to a path accessible from the repository's root.
It can either be a River file such as `FILE_NAME.alloy` or `DIR_NAME/FILE_NAME.alloy` or
a directory containing River files such as `DIR_NAME` or `.` if the River files are stored at the root
It can either be an {{< param "PRODUCT_NAME" >}} configuration file such as `FILE_NAME.alloy` or `DIR_NAME/FILE_NAME.alloy` or
a directory containing {{< param "PRODUCT_NAME" >}} configuration files such as `DIR_NAME` or `.` if the {{< param "PRODUCT_NAME" >}} configuration files are stored at the root
of the repository.

If `pull_frequency` isn't `"0s"`, the Git repository is pulled for updates at the frequency specified.
Expand Down
4 changes: 2 additions & 2 deletions docs/sources/reference/stdlib/json_decode.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@ title: json_decode

# json_decode

The `json_decode` function decodes a string representing JSON into a River value.
The `json_decode` function decodes a string representing JSON into an {{< param "PRODUCT_NAME" >}} value.
`json_decode` fails if the string argument provided can't be parsed as JSON.

A common use case of `json_decode` is to decode the output of a [`local.file`][] component to a River value.
A common use case of `json_decode` is to decode the output of a [`local.file`][] component to an {{< param "PRODUCT_NAME" >}} value.

> Remember to escape double quotes when passing JSON string literals to `json_decode`.
>
Expand Down
2 changes: 1 addition & 1 deletion docs/sources/reference/stdlib/json_path.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ The function expects two strings. The first string is the JSON string used look

`json_path` always returns a list of values. If the JSONPath expression doesn't match any values, an empty list is returned.

A common use case of `json_path` is to decode and filter the output of a [`local.file`][] or [`remote.http`][] component to a River value.
A common use case of `json_path` is to decode and filter the output of a [`local.file`][] or [`remote.http`][] component to an {{< param "PRODUCT_NAME" >}} syntax value.

> Remember to escape double quotes when passing JSON string literals to `json_path`.
>
Expand Down
2 changes: 1 addition & 1 deletion docs/sources/tasks/configure/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ weight: 90
# Configure {{% param "FULL_PRODUCT_NAME" %}}

You can configure {{< param "PRODUCT_NAME" >}} after it is [installed][Install].
The default River configuration file for {{< param "PRODUCT_NAME" >}} is located at:
The default configuration file for {{< param "PRODUCT_NAME" >}} is located at:

* Linux: `/etc/alloy/config.alloy`
* macOS: `$(brew --prefix)/etc/alloy/config.alloy`
Expand Down
2 changes: 1 addition & 1 deletion docs/sources/tasks/configure/configure-macos.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ To customize the {{< param "PRODUCT_NAME" >}} service on macOS, perform the foll

1. Modify the `service` section as desired to change things such as:

* The River configuration file used by {{< param "PRODUCT_NAME" >}}.
* The configuration file used by {{< param "PRODUCT_NAME" >}}.
* Flags passed to the {{< param "PRODUCT_NAME" >}} binary.
* Location of log files.

Expand Down
Loading

0 comments on commit d5fdb22

Please sign in to comment.