# Load OpenTelemetry module (path will be determined at runtime or use relative path) # The nginx:1.29.3-alpine-otel image should have the module available load_module modules/ngx_otel_module.so; worker_processes auto; # Send error logs to stderr for kubectl logs error_log /dev/stderr warn; pid ${NGINX_PID}; events { worker_connections 1024; } http { include /etc/nginx/mime.types; default_type application/octet-stream; gzip on; gzip_disable "msie6"; gzip_vary on; gzip_proxied any; gzip_comp_level 6; gzip_buffers 16 8k; gzip_http_version 1.1; gzip_min_length 256; gzip_types text/plain text/css application/json application/x-javascript text/xml application/xml application/xml+rss text/javascript application/vnd.ms-fontobject application/x-font-ttf font/opentype image/svg+xml image/x-icon application/javascript; log_format main '$remote_addr - $remote_user [$time_local] "$request" ' '$status $body_bytes_sent "$http_referer" ' '"$http_user_agent" "$http_x_forwarded_for" ' '"$otel_trace_id"'; sendfile on; keepalive_timeout 65; # Include server configurations include /etc/nginx/conf.d/*.conf; access_log /dev/stdout ${NGINX_ACCESS_LOG_FORMAT}; error_log /dev/stderr ${NGINX_ERROR_LOG_LEVEL}; ${NGINX_EXTRA_ACCESS_LOG} ${NGINX_EXTRA_ERROR_LOG} }