generated from nginx/template-repository
-
Notifications
You must be signed in to change notification settings - Fork 123
feat: Add OpenTelemetry documentation #824
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from 9 commits
Commits
Show all changes
13 commits
Select commit
Hold shift + click to select a range
ea04856
feat: Add OpenTelemetry documentation
ADubhlaoich 682dbdb
Merge branch 'main' into nic/otel-instructions
ADubhlaoich 5d2aa57
Merge branch 'main' into nic/otel-instructions
ADubhlaoich 996760d
Merge branch 'main' into nic/otel-instructions
ADubhlaoich c31851d
feat: Add example YAML file, clarify text
ADubhlaoich 4faa7ec
Update content/nic/releases.md
ADubhlaoich c4e8ec4
Merge branch 'main' into nic/otel-instructions
ADubhlaoich 692d630
Merge branch 'main' into nic/otel-instructions
ADubhlaoich b60a033
Merge branch 'main' into nic/otel-instructions
ADubhlaoich fe56108
Merge branch 'main' into nic/otel-instructions
ADubhlaoich bc65dc9
feat: Update OpenTracing document
ADubhlaoich e9261ca
Merge branch 'nic/otel-instructions' of github.com:nginx/documentatio…
ADubhlaoich 77e15c5
Merge branch 'main' into nic/otel-instructions
ADubhlaoich File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,9 +1,6 @@ | ||
| --- | ||
| title: Logging And Monitoring | ||
| title: Logging and monitoring | ||
| description: | ||
| weight: 1500 | ||
| url: /nginx-ingress-controller/logging-and-monitoring | ||
| menu: | ||
| docs: | ||
| parent: NGINX Ingress Controller | ||
| --- |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,105 @@ | ||
| --- | ||
| # We use sentence case and present imperative tone | ||
| title: "Enable OpenTelemetry" | ||
| # Weights are assigned in increments of 100: determines sorting order | ||
| weight: 300 | ||
| # Creates a table of contents and sidebar, useful for large documents | ||
| toc: true | ||
| # Types have a 1:1 relationship with Hugo archetypes, so you shouldn't need to change this | ||
| nd-content-type: how-to | ||
| # Intended for internal catalogue and search, case sensitive: | ||
| # Agent, N4Azure, NIC, NIM, NGF, NAP-DOS, NAP-WAF, NGINX One, NGINX+, Solutions, Unit | ||
| nd-product: NIC | ||
| --- | ||
|
|
||
| This topic describes how to enable [OpenTelemetry](https://opentelemetry.io/) for F5 NGINX Ingress Controller using the [native NGINX module](https://nginx.org/en/docs/ngx_otel_module.html). | ||
|
|
||
| ## Before you begin | ||
|
|
||
| To complete this guide, you need the following pre-requisites: | ||
|
|
||
| - An [NGINX Ingress Controller installation]({{< ref "/nic/installation/" >}}) with OpenTelemetry (v5.1.0+) | ||
|
|
||
| ## Load the OpenTelemetry module | ||
|
|
||
| To enable OpenTelemetry, you must first load the module by adding the [_otel-exporter-endpoint_ ConfigMap key]({{< ref "/nic/configuration/global-configuration/configmap-resource.md#modules" >}}), which takes an endpoint argument. | ||
|
|
||
| The following is an example of a OpenTelemetry collector running in your cluster as the target for exporting data: | ||
|
|
||
| ```yaml | ||
| otel-exporter-endpoint: "http://otel-collector.default.svc.cluster.local:4317" | ||
| ``` | ||
|
|
||
| A complete ConfigMap example with all OpenTelemetry options could look as follows: | ||
|
|
||
| {{< ghcode "https://raw.githubusercontent.com/nginx/kubernetes-ingress/refs/heads/main/examples/shared-examples/otel/nginx-config.yaml" >}} | ||
|
|
||
| ## Enable OpenTelemetry | ||
|
|
||
| Once you have loaded the module, you can now enable OpenTelemetry. | ||
|
|
||
| You can configure it globally for all resources, or on a per resource basis. | ||
|
|
||
| ### Global | ||
|
|
||
| To enable OpenTelemetry for all resources, set the _otel-trace-in-http_ ConfigMap key to `true`: | ||
|
|
||
| ```yaml | ||
| otel-trace-in-http: "true" | ||
| ``` | ||
|
|
||
| ### Per resource | ||
|
|
||
| You can configure OpenTelemetry on a per resource basis in NGINX Ingress Controller. | ||
|
|
||
| For this functionality, you must [enable snippets]({{< ref "/nic/configuration/ingress-resources/advanced-configuration-with-snippets.md" >}}) with the `-enable-snippets` command-line argument. | ||
|
|
||
| Based on the state of global configuration, you can selectively enable or disable metrics for each resource. | ||
|
|
||
| #### Enable a specific resource or path | ||
|
|
||
| With OpenTelemetry **disabled** globally, you can enable it for a specific resource using the server snippet annotation: | ||
|
|
||
| ```yaml | ||
| nginx.org/server-snippets: | | ||
| otel_trace on; | ||
| ``` | ||
|
|
||
| You can enable it for specific paths using [Mergeable Ingress resources]({{< ref "/nic/configuration/ingress-resources/cross-namespace-configuration.md" >}}). | ||
|
|
||
| Use the server snippet annotation for the paths of a specific Minion Ingress resource: | ||
|
|
||
| ```yaml | ||
| nginx.org/location-snippets: | | ||
| otel_trace on; | ||
| ``` | ||
|
|
||
| #### Disable a specific resource or path | ||
|
|
||
| With OpenTelemetry **enabled** globally, you can disable it for a specific resource using the server snippet annotation: | ||
|
|
||
| ```yaml | ||
| nginx.org/server-snippets: | | ||
| otel_trace off; | ||
| ``` | ||
|
|
||
| You can disable it for specific paths using [Mergeable Ingress resources]({{< ref "/nic/configuration/ingress-resources/cross-namespace-configuration.md" >}}). | ||
|
|
||
| Use the server snippet annotation for the paths of a specific Minion Ingress resource: | ||
|
|
||
| ```yaml | ||
| nginx.org/location-snippets: | | ||
| otel_trace off; | ||
| ``` | ||
|
|
||
| ## Customize OpenTelemetry | ||
|
|
||
| {{< call-out "note" >}} | ||
|
|
||
| You cannot modify the additional directives in the _otel_exporter_ block using snippets. | ||
|
|
||
| {{< /call-out >}} | ||
|
|
||
| You can customize OpenTelemetry through the supported [OpenTelemetry module directives](https://nginx.org/en/docs/ngx_otel_module.html). | ||
|
|
||
| Use the `location-snippets` ConfigMap keys or annotations to insert those directives into the generated NGINX configuration. |
16 changes: 12 additions & 4 deletions
16
.../installation/integrations/opentracing.md → ...nic/logging-and-monitoring/opentracing.md
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.