Skip to content

Conversation

@aphralG
Copy link
Contributor

@aphralG aphralG commented Oct 6, 2025

Proposed changes

Add section to OpenTelemetry Metrics on how to use a custom OpenTelemetry config with NGINX Agent.

A new feature will be added to the Agent where a user can bring there own OpenTelemetry config which will be merged with the Agents default config. This change documents how to use this feature and how to debug any issues the user might have with it.

This feature will be released in Agent 3.5 release

Checklist

Before sharing this pull request, I completed the following checklist:

Footnotes

  1. Potentially sensitive information includes personally identify information (PII), authentication credentials, and live URLs. Refer to the style guide for guidance about placeholder content.

@aphralG aphralG self-assigned this Oct 6, 2025
@github-actions github-actions bot added documentation Improvements or additions to documentation product/nginx-one Issues related to NGINX One Console labels Oct 6, 2025
@github-actions
Copy link

github-actions bot commented Oct 6, 2025

Deploy Preview will be available once build job completes!

Name Link
😎 Deploy Preview https://frontdoor-test-docs.nginx.com/previews/docs/1261/

@aphralG aphralG marked this pull request as ready for review November 4, 2025 11:29
@aphralG aphralG requested a review from a team as a code owner November 4, 2025 11:29
```yaml
collector:
additional_config_paths:
- "/my_config.yaml"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
- "/my_config.yaml"
- "/etc/nginx-agent/my_config.yaml"

prometheus:
endpoint: "127.0.0.1:5643"
resource_to_telemetry_conversion:
enabled: true
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
enabled: true
enabled: true
namespace: test-space

prometheus:
endpoint: "127.0.0.1:5643"
resource_to_telemetry_conversion:
enabled: true
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
enabled: true
enabled: true
namespace: test-space

Comment on lines +123 to +130
timeout: 10s
retry_on_failure:
enabled: true
initial_interval: 10s
max_interval: 60s
max_elapsed_time: 10m
tls:
insecure: true
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
timeout: 10s
retry_on_failure:
enabled: true
initial_interval: 10s
max_interval: 60s
max_elapsed_time: 10m
tls:
insecure: true

Comment on lines +150 to +157
timeout: 10s
retry_on_failure:
enabled: true
initial_interval: 10s
max_interval: 60s
max_elapsed_time: 10m
tls:
insecure: true
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
timeout: 10s
retry_on_failure:
enabled: true
initial_interval: 10s
max_interval: 60s
max_elapsed_time: 10m
tls:
insecure: true

### Custom OTel Configuration
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
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
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
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

Comment on lines +46 to +48
bring your own OpenTelemetry configs which will be merged with the NGINX Agent default config.
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.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is a bit redundant (the part mentioning the config will be merged)

Suggested change
bring your own OpenTelemetry configs which will be merged with the NGINX Agent default config.
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.
bring your own [OpenTelemetry configs](https://opentelemetry.io/docs/collector/configuration/) which will be merged with the NGINX Agent default config.
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.

To have NGINX Agent use your own OpenTelemetry config:
1. Edit the configuration file `sudo vim /etc/nginx-agent/nginx-agent.conf`
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
1. Edit the configuration file `sudo vim /etc/nginx-agent/nginx-agent.conf`
1. Edit the configuration file as root `vim /etc/nginx-agent/nginx-agent.conf`

### Troubleshooting
To view the merged OpenTelemetry configuration set the Agent log level to debug in `/etc/nginx-agent/nginx-agent.conf` and restart NGINX Agent
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
To view the merged OpenTelemetry configuration set the Agent log level to debug in `/etc/nginx-agent/nginx-agent.conf` and restart NGINX Agent
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:

Comment on lines +227 to +234
1. Edit the configuration file `sudo vim /etc/nginx-agent/nginx-agent.conf`
2. Change the log property
```yaml
log:
level: debug
```
3. Restart NGINX Agent
4. View merged OpenTelemetry configuration `cat /var/lib/nginx-agent/opentelemetry-collector-agent-debug.yaml`
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
1. Edit the configuration file `sudo vim /etc/nginx-agent/nginx-agent.conf`
2. Change the log property
```yaml
log:
level: debug
```
3. Restart NGINX Agent
4. View merged OpenTelemetry configuration `cat /var/lib/nginx-agent/opentelemetry-collector-agent-debug.yaml`
1. Edit the configuration file `sudo vim /etc/nginx-agent/nginx-agent.conf`
1. Change the log property
```yaml
log:
level: debug
```
1. Restart NGINX Agent, run as root:
```shell
systemctl restart nginx-agent
```
1. View the merged OpenTelemetry configuration `cat /var/lib/nginx-agent/opentelemetry-collector-agent-debug.yaml`

@JTorreG JTorreG requested a review from a team November 6, 2025 17:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation product/nginx-one Issues related to NGINX One Console

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants