diff --git a/docs/kubectl-plugin.md b/docs/kubectl-plugin.md index 9e5a5dcc6d..4ca5745572 100644 --- a/docs/kubectl-plugin.md +++ b/docs/kubectl-plugin.md @@ -201,14 +201,12 @@ kubectl ingress-nginx conf -n ingress-nginx --host testaddr.local ```console $ kubectl ingress-nginx exec -i -n ingress-nginx -- ls /etc/nginx fastcgi_params -geoip lua mime.types modsecurity modules nginx.conf opentracing.json -opentelemetry.toml owasp-modsecurity-crs template ``` diff --git a/docs/user-guide/nginx-configuration/annotations.md b/docs/user-guide/nginx-configuration/annotations.md index b13feafff4..8de8afe5ba 100755 --- a/docs/user-guide/nginx-configuration/annotations.md +++ b/docs/user-guide/nginx-configuration/annotations.md @@ -122,7 +122,7 @@ You can add these Kubernetes annotations to specific Ingress objects to customiz |[nginx.ingress.kubernetes.io/connection-proxy-header](#connection-proxy-header)|string| |[nginx.ingress.kubernetes.io/enable-access-log](#enable-access-log)|"true" or "false"| |[nginx.ingress.kubernetes.io/enable-opentelemetry](#enable-opentelemetry)|"true" or "false"| -|[nginx.ingress.kubernetes.io/opentelemetry-trust-incoming-span](#opentelemetry-trust-incoming-spans)|"true" or "false"| +|[nginx.ingress.kubernetes.io/opentelemetry-trust-incoming-span](#opentelemetry-trust-incoming-span)|"true" or "false"| |[nginx.ingress.kubernetes.io/use-regex](#use-regex)|bool| |[nginx.ingress.kubernetes.io/enable-modsecurity](#modsecurity)|bool| |[nginx.ingress.kubernetes.io/enable-owasp-core-rules](#modsecurity)|bool| diff --git a/docs/user-guide/nginx-configuration/configmap.md b/docs/user-guide/nginx-configuration/configmap.md index e555ab92a0..d58f12ae17 100644 --- a/docs/user-guide/nginx-configuration/configmap.md +++ b/docs/user-guide/nginx-configuration/configmap.md @@ -57,7 +57,7 @@ The following table shows a configuration option's name, type, and the default v | [error-log-level](#error-log-level) | string | "notice" | | | [http2-max-field-size](#http2-max-field-size) | string | "" | DEPRECATED in favour of [large_client_header_buffers](#large-client-header-buffers) | | [http2-max-header-size](#http2-max-header-size) | string | "" | DEPRECATED in favour of [large_client_header_buffers](#large-client-header-buffers) | -| [http2-max-requests](#http2-max-requests) | int | 0 | DEPRECATED in favour of [keepalive_requests](#keepalive-requests) | +| [http2-max-requests](#http2-max-requests) | int | 0 | DEPRECATED in favour of [keepalive_requests](#keep-alive-requests) | | [http2-max-concurrent-streams](#http2-max-concurrent-streams) | int | 128 | | | [hsts](#hsts) | bool | "true" | | | [hsts-include-subdomains](#hsts-include-subdomains) | bool | "true" | | @@ -115,7 +115,7 @@ The following table shows a configuration option's name, type, and the default v | [worker-shutdown-timeout](#worker-shutdown-timeout) | string | "240s" | | | [enable-serial-reloads](#enable-serial-reloads) | bool | "false" | | | [load-balance](#load-balance) | string | "round_robin" | | -| [variables-hash-bucket-size](#variables-hash-bucket-size) | int | 128 | | +| [variables-hash-bucket-size](#variables-hash-bucket-size) | int | 256 | | | [variables-hash-max-size](#variables-hash-max-size) | int | 2048 | | | [upstream-keepalive-connections](#upstream-keepalive-connections) | int | 320 | | | [upstream-keepalive-time](#upstream-keepalive-time) | string | "1h" | | @@ -157,15 +157,15 @@ The following table shows a configuration option's name, type, and the default v | [enable-opentelemetry](#enable-opentelemetry) | bool | "false" | | | [opentelemetry-trust-incoming-span](#opentelemetry-trust-incoming-span) | bool | "true" | | | [opentelemetry-operation-name](#opentelemetry-operation-name) | string | "" | | -| [opentelemetry-config](#/etc/nginx/opentelemetry.toml) | string | "/etc/nginx/opentelemetry.toml" | | +| [opentelemetry-config](#opentelemetry-config) | string | "/etc/ingress-controller/telemetry/opentelemetry.toml" | | | [otlp-collector-host](#otlp-collector-host) | string | "" | | | [otlp-collector-port](#otlp-collector-port) | int | 4317 | | -| [otel-max-queuesize](#otel-max-queuesize) | int | | | -| [otel-schedule-delay-millis](#otel-schedule-delay-millis) | int | | | -| [otel-max-export-batch-size](#otel-max-export-batch-size) | int | | | +| [otel-max-queuesize](#otel-max-queuesize) | int | 2048 | | +| [otel-schedule-delay-millis](#otel-schedule-delay-millis) | int | 5000 | | +| [otel-max-export-batch-size](#otel-max-export-batch-size) | int | 512 | | | [otel-service-name](#otel-service-name) | string | "nginx" | | -| [otel-sampler](#otel-sampler) | string | "AlwaysOff" | | -| [otel-sampler-parent-based](#otel-sampler-parent-based) | bool | "false" | | +| [otel-sampler](#otel-sampler) | string | "AlwaysOn" | | +| [otel-sampler-parent-based](#otel-sampler-parent-based) | bool | "true" | | | [otel-sampler-ratio](#otel-sampler-ratio) | float | 0.01 | | | [main-snippet](#main-snippet) | string | "" | | | [http-snippet](#http-snippet) | string | "" | | @@ -220,7 +220,7 @@ The following table shows a configuration option's name, type, and the default v | [default-type](#default-type) | string | "text/html" | | | [service-upstream](#service-upstream) | bool | "false" | | | [ssl-reject-handshake](#ssl-reject-handshake) | bool | "false" | | -| [debug-connections](#debug-connections) | []string | "127.0.0.1,1.1.1.1/24" | | +| [debug-connections](#debug-connections) | []string | "" | | | [strict-validate-path-type](#strict-validate-path-type) | bool | "true" | | | [grpc-buffer-size-kb](#grpc-buffer-size-kb) | int | 0 | | @@ -1020,6 +1020,10 @@ Specifies a custom name for the server span. _**default:**_ is empty For example, set to "HTTP $request_method $uri". +## opentelemetry-config + +Sets the opentelemetry config file. _**default:**_ /etc/ingress-controller/telemetry/opentelemetry.toml + ## otlp-collector-host Specifies the host to use when uploading traces. It must be a valid URL. @@ -1038,7 +1042,7 @@ Enables or disables using spans from incoming requests as parent for created one ## otel-sampler-parent-based -Uses sampler implementation which by default will take a sample if parent Activity is sampled. _**default:**_ false +Uses sampler implementation which by default will take a sample if parent Activity is sampled. _**default:**_ true ## otel-sampler-ratio @@ -1046,7 +1050,7 @@ Specifies sample rate for any traces created. _**default:**_ 0.01 ## otel-sampler -Specifies the sampler to be used when sampling traces. The available samplers are: AlwaysOff, AlwaysOn, TraceIdRatioBased, remote. _**default:**_ AlwaysOff +Specifies the sampler to be used when sampling traces. The available samplers are: AlwaysOff, AlwaysOn, TraceIdRatioBased, remote. _**default:**_ AlwaysOn ## main-snippet diff --git a/docs/user-guide/third-party-addons/opentelemetry.md b/docs/user-guide/third-party-addons/opentelemetry.md index 7ca8c8aaca..a1a336025d 100644 --- a/docs/user-guide/third-party-addons/opentelemetry.md +++ b/docs/user-guide/third-party-addons/opentelemetry.md @@ -152,7 +152,7 @@ To install the example and collectors run: kind: ConfigMap data: enable-opentelemetry: "true" - opentelemetry-config: "/etc/nginx/opentelemetry.toml" + opentelemetry-config: "/etc/ingress-controller/telemetry/opentelemetry.toml" opentelemetry-operation-name: "HTTP $request_method $service_name $uri" opentelemetry-trust-incoming-span: "true" otlp-collector-host: "otel-coll-collector.otel.svc" diff --git a/internal/ingress/controller/config/config.go b/internal/ingress/controller/config/config.go index 4a3c764b2b..d7ac63b6ce 100644 --- a/internal/ingress/controller/config/config.go +++ b/internal/ingress/controller/config/config.go @@ -572,7 +572,7 @@ type Configuration struct { GenerateRequestID bool `json:"generate-request-id,omitempty"` // Adds an X-Original-Uri header with the original request URI to the backend request - // Default: true + // Default: false ProxyAddOriginalURIHeader bool `json:"proxy-add-original-uri-header"` // EnableOpentelemetry enables the nginx Opentelemetry extension @@ -580,7 +580,7 @@ type Configuration struct { EnableOpentelemetry bool `json:"enable-opentelemetry"` // OpentelemetryConfig sets the opentelemetry config file - // Default: /etc/nginx/opentelemetry.toml + // Default: /etc/ingress-controller/telemetry/opentelemetry.toml OpentelemetryConfig string `json:"opentelemetry-config"` // OpentelemetryOperationName specifies a custom name for the server span