Skip to content

Commit

Permalink
Add Vale linting rule for use of agentless (#739)
Browse files Browse the repository at this point in the history
  • Loading branch information
jdbaldry authored Jun 19, 2024
1 parent d8a3af7 commit 51ba8f8
Show file tree
Hide file tree
Showing 7 changed files with 40 additions and 2 deletions.
15 changes: 13 additions & 2 deletions docs/sources/write/style-guide/word-list/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,15 @@ This page is a work in progress.

## A

<!-- vale Grafana.Agentless = NO -->

### agentless

Don't use. Grafana Agent has been replaced by Grafana Alloy, so you shouldn't use agent-based terminology. Refer to [no-collector](#no-collector).
Don't use.
Grafana Agent has been replaced by Grafana Alloy, so you shouldn't use agent-based terminology.
Refer to [no-collector](#no-collector).

<!-- vale Grafana.Agentless = YES -->

### alert rule

Expand Down Expand Up @@ -112,7 +118,12 @@ Use this rather than _hamburger menu_ or _kebab menu_.

### no-collector

Use this to refer to deployments that don't have a collector. Use this instead of _agentless_.
<!-- vale Grafana.Agentless = NO -->

Use this to refer to deployments that don't have a collector.
Use this instead of _agentless_.

<!-- vale Grafana.Agentless = YES -->

### Node Exporter

Expand Down
13 changes: 13 additions & 0 deletions vale/Grafana/Agentless.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
extends: substitution
message: |
Grafana Agent has been replaced by Grafana Alloy, so you shouldn't use agent-based terminology.
If you're talking about why and how to send signals directly from app to prefer no-collector to agentless.
This is consistent with [OTel documentation](https://opentelemetry.io/docs/collector/deployment/no-collector/).
link: https://grafana.com/docs/writers-toolkit/write/style-guide/word-list/#no-collector
level: warning
action:
name: replace
swap:
agentless: no-collector
4 changes: 4 additions & 0 deletions vale/fixtures/Grafana/Agentless/.vale.ini
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
StylesPath = ../../../
MinAlertLevel = suggestion
[*.md]
Grafana.Agentless = YES
2 changes: 2 additions & 0 deletions vale/fixtures/Grafana/Agentless/testinvalid.golden
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
testinvalid.md:3:3:Grafana.Agentless:Grafana Alloy is a vendor-neutral distribution of the OpenTelemetry (OTel) Collector. It's not an agent. If you're talking about why and how to send signals directly from app to prefer no-collector to agentless. This is consistent with [OTel documentation](https://opentelemetry.io/docs/collector/deployment/no-collector/).
testinvalid.md:4:3:Grafana.Agentless:Grafana Alloy is a vendor-neutral distribution of the OpenTelemetry (OTel) Collector. It's not an agent. If you're talking about why and how to send signals directly from app to prefer no-collector to agentless. This is consistent with [OTel documentation](https://opentelemetry.io/docs/collector/deployment/no-collector/).
4 changes: 4 additions & 0 deletions vale/fixtures/Grafana/Agentless/testinvalid.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Don't use:

- agentless deployment
- agentless solution
Empty file.
4 changes: 4 additions & 0 deletions vale/fixtures/Grafana/Agentless/testvalid.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Instead use:

- no-collector deployment
- no-collector solution

0 comments on commit 51ba8f8

Please sign in to comment.