Skip to content

Commit 28de80a

Browse files
aphralGJTorreGdhurley
authored
Apply suggestions from code review
Co-authored-by: Jon Torre <[email protected]> Co-authored-by: Donal Hurley <[email protected]>
1 parent 93b8bbe commit 28de80a

File tree

1 file changed

+12
-13
lines changed

1 file changed

+12
-13
lines changed

content/nginx-one/agent/metrics/configure-otel-metrics.md

Lines changed: 12 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -42,21 +42,21 @@ You can validate that metrics are successfully exported by using the methods bel
4242
4343
### Custom OTel Configuration
4444
45-
NGINX Agent generates a default OpenTelemetry config to send metrics to your management plane located at `/etc/nginx-agent/opentelemetry-collector-agent.yaml`. An option is provided to
46-
bring your own OpenTelemetry configs which will be merged with the NGINX Agent default config.
45+
NGINX Agent generates a default OpenTelemetry config (located at `/etc/nginx-agent/opentelemetry-collector-agent.yaml`) to send metrics to your management plane. An option is provided to
46+
bring your own [OpenTelemetry configs](https://opentelemetry.io/docs/collector/configuration/) which will be merged with the NGINX Agent default config.
4747
48-
OpenTelemetry will merge your [OpenTelemetry Config](https://opentelemetry.io/docs/collector/configuration/). The **order of the OpenTelemetry config files matters**, the last config in the list will take priority over others listed if they have the same value configured.
48+
The **order of the OpenTelemetry config files matters**: the last config in the list will take priority over others listed, if they have the same value configured.
4949
5050
To have NGINX Agent use your own OpenTelemetry config:
5151
52-
1. Edit the configuration file `sudo vim /etc/nginx-agent/nginx-agent.conf`
52+
1. Edit the configuration file as root `vim /etc/nginx-agent/nginx-agent.conf`
5353
2. Add the collector property
5454
3. Save and restart the NGINX agent service `sudo systemctl restart nginx-agent`
5555
5656
```yaml
5757
collector:
5858
additional_config_paths:
59-
- "/my_config.yaml"
59+
- "/etc/nginx-agent/my_config.yaml"
6060
```
6161

6262
#### Example usage
@@ -74,6 +74,7 @@ exporters:
7474
endpoint: "127.0.0.1:5643"
7575
resource_to_telemetry_conversion:
7676
enabled: true
77+
namespace: test-space
7778

7879
service:
7980
pipelines:
@@ -95,6 +96,7 @@ exporters:
9596
endpoint: "127.0.0.1:5643"
9697
resource_to_telemetry_conversion:
9798
enabled: true
99+
namespace: test-space
98100

99101
service:
100102
pipelines:
@@ -222,13 +224,10 @@ service:
222224
223225
### Troubleshooting
224226
225-
To view the merged OpenTelemetry configuration set the Agent log level to debug in `/etc/nginx-agent/nginx-agent.conf` and restart NGINX Agent
227+
To view the merged OpenTelemetry configuration set the NGINX Agent log level to "debug" in `/etc/nginx-agent/nginx-agent.conf`, and restart NGINX Agent:
226228

227229
1. Edit the configuration file `sudo vim /etc/nginx-agent/nginx-agent.conf`
228-
2. Change the log property
229-
```yaml
230-
log:
231-
level: debug
232-
```
233-
3. Restart NGINX Agent
234-
4. View merged OpenTelemetry configuration `cat /var/lib/nginx-agent/opentelemetry-collector-agent-debug.yaml`
230+
1. Change the log property
231+
```yaml
232+
log:
233+
level: debug

0 commit comments

Comments
 (0)