Skip to content

Commit 51b70ce

Browse files
ptodevclayton-cornellwildum
committed
Apply suggestions from code review
Co-authored-by: Clayton Cornell <[email protected]> Co-authored-by: William Dumont <[email protected]>
1 parent 105b451 commit 51b70ce

File tree

3 files changed

+34
-25
lines changed

3 files changed

+34
-25
lines changed

docs/sources/flow/when-to-use-flow/_index.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,18 +15,18 @@ Grafana Agent Flow allows you to process telemetry in a variety of formats, nati
1515

1616
Native processing of telemetry could lead to higher efficiency and ease of use.
1717

18-
It is also possible from switch to one format to another. For example:
18+
It is also possible to switch from one format to another. For example:
1919
* `otelcol.exporter.prometheus` converts OTLP metrics to Prometheus logs.
2020
* `otelcol.receiver.prometheus` converts Prometheus metrics to OTLP metrics.
2121
* `otelcol.exporter.loki` converts OTLP logs to Loki logs.
2222
* `otelcol.receiver.loki` converts Loki logs to OTLP logs.
2323
* `otelcol.connector.spanlogs` converts OTLP spans to OTLP logs.
2424
* `otelcol.connector.spanmetrics` converts OTLP spans to OTLP metrics.
2525

26-
There are even Flow components which do not deal with telemetry. For example, `mimir.rules.kubernetes`
26+
There are even Flow components that do not deal with telemetry. For example, `mimir.rules.kubernetes`
2727
can be used to configure a Mimir instance.
2828

29-
The articles in this section describe in more detail how Flow compares to similar products:
29+
The following topics describe in more detail how Flow compares to similar products:
3030

3131
{{< section >}}
3232

docs/sources/flow/when-to-use-flow/opentelemetry-collector.md

Lines changed: 30 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -18,80 +18,89 @@ The Collector may be a better choice if:
1818
* You are already using the Collector, and do not need any of the features of Flow.
1919
* You prefer YAML syntax over River.
2020

21-
Below you can find more details on similarities and differences between the Collector and Flow.
22-
2321
## Similarities
2422

2523
### Many Collector components are available in Flow
2624

27-
Flow contains many of the components available inside the Collector:
28-
* For example, the OTLP exporter is available as `otelcol.exporter.otlp`.
29-
* The Grafana Agent development team is actively working on adding more of the Collector's components to Flow.
30-
* If a Flow user needs a Collector feature to be made available in the Agent, the Agent development team could work on implementing it.
25+
Flow contains many of the components available inside the Collector.
26+
For example, Collector's OTLP exporter is available in Flow as `otelcol.exporter.otlp`.
27+
28+
The Grafana Agent development team is actively working on adding more of the Collector's components to Flow.
29+
If a Flow user needs a Collector feature to be made available in the Agent, the Agent development team could work on implementing it.
3130

3231
### Similar performance when processing OpenTelemetry signals natively
3332

3433
Most of Flow's `otelcol` components are just thin wrappers over a Collector component.
35-
Hence, the CPU and memory performance of Flow is similar.
34+
As a result, the CPU and memory performance of Flow is similar.
3635

3736
## Differences
3837

3938
### Configuration language
4039

41-
Collector is configured using yaml, whereas Flow is configured using River.
40+
Collector uses YAML for its configuration, and Flow uses River for its configuration.
4241

4342
#### Example - coalesce
4443

45-
One of River's main advantages is its standard library. It contains handy functions such as coalesce,
46-
which could be used to retrieve the first argument which is not null or empty:
44+
One of River's main advantages is its standard library. It contains handy functions such as coalesce.
45+
You can use this function to retrieve the first argument which is not null or empty:
4746

4847
```river
4948
```
5049

5150
### Modularity
5251

53-
The Agent configuration is more flexible, modular, and allows for more opportunities to chain components together in a pipeline.
52+
The Agent configuration is flexible and modular:
53+
* Telemetry and non-telemetry components can be combined easily.
54+
For example, a configuration argument for `otelcol.exporter.otlp` could be supplied from the response of an HTTP request via `remote.http`.
55+
* Some or all of the components which an Agent runs could be defined outside of its main config file.
56+
For example, whole snippets of Flow configuration could be loaded from a file (`module.file`),
57+
a Git repository (`module.git`), or a an HTTP endpoint (`module.http`).
5458

5559
#### Example - retrieving data from a file
5660

57-
Let's say you would like to use OAuth2 authentication in the Collector. If you need to retrieve `client_id`
58-
or `client_secret` from a file, then you would have to use the `client_id_file` or `client_secret_file` config parameters.
61+
Let's say you want to use OAuth2 authentication in the Collector. If you need to retrieve `client_id`
62+
or `client_secret` from a file, then you must use the `client_id_file` or `client_secret_file` config parameters.
5963

6064
```yaml
6165
```
6266

6367
In the Agent, you'd use `otelcol.auth.oauth2` with the normal `client_id` and `client_secret` parameters,
64-
and you would setup another component which retrieves those from a `local.file` component.
68+
and you would set up another component that retrieves those from a `local.file` component.
6569

6670
```river
6771
```
6872

69-
Moreover, the string could also come from a `remote.s3`, `remote.vault`, or `remote.http`.
73+
The string could also come from a `remote.s3`, `remote.vault`, or `remote.http`.
7074
This gives Flow users lots of flexibility because strings coming out of those components
71-
could be used for any parameter, in any component which requires a string - not just for
75+
could be used for any parameter in any component which requires a string - not just for
7276
a `client_id` for OAuth2.
7377

7478
```river
7579
```
7680

7781
### Flow can process Prometheus signals natively
7882

79-
Collector needs to convert Prometheus signals to the OTLP format in order to process them.
83+
Collector needs to convert Prometheus signals to the OTLP format to process them.
8084
Flow, on the other hand, can process those signals natively using components such as `prometheus.relabel`, `prometheus.relabel`, and `prometheus.remote_write`.
8185
This could lead to better performance and ease of use.
8286

8387
### Flow documentation is consistent and structured
8488

85-
Flow components tend to be documented in a more consistent way than Collector components.
89+
Flow components are documented in a consistent and structured way.
8690

8791
### Some Collector features are not available in the Agent and vice-versa
8892

89-
Agent doesn't have all the components which the Collector has. However, the Grafana Agent development team is working on
90-
adding new components all the time and we would be happy to add new components which Flow users need.
93+
Agent doesn't have all the components which the Collector has. However, the Grafana Agent development team is constantly working on
94+
adding new components, and would be happy to add new components that Flow users need.
9195

9296
### Flow supports "profile" telemetry signals
9397

94-
OpenTelemetry currently does not support "profile" signals. Flow supports them through components such as `pyroscope.scrape` and `pyroscope.ebpf`.
98+
OpenTelemetry currently does not support "profile" signals. Flow supports "profile" signals through components such as `pyroscope.scrape` and `pyroscope.ebpf`.
99+
100+
### Flow can load balance scraping dynamically
101+
102+
Using clustering, `prometheus.scrape` and `pyroscope.scrape` use a gossip communication to load balance
103+
scraping among each other. Agents can be added and removed from the cluster without having to restart the whole set of Agents.
95104

96105
### Flow is usually a few versions of OpenTelemetry behind
97106

docs/sources/flow/when-to-use-flow/prometheus-agent.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ Grafana Agent Flow supports all of the [features][prom-agent-mode-blog] of the [
1414
* `prometheus.relabel`
1515
* `prometheus.remote_write`
1616

17-
Agent Flow's performance is comparable to Prometheus, because `prometheus` Flow components are abe
17+
Agent Flow's performance is comparable to Prometheus, because `prometheus` Flow components are able
1818
to processes Prometheus metrics natively without converting them to other formats such as OTLP.
1919

2020
Agent Flow also comes pre-built with exporters out of the box. For example, `prometheus.exporter.unix`

0 commit comments

Comments
 (0)