Download and Install the NGINX Agent
Sample OpenTelemetry Module Configuration File
NginxModuleEnabled ON;
#NginxModule Otel Exporter details
NginxModuleOtelSpanExporter otlp;
NginxModuleOtelExporterEndpoint docker.for.mac.localhost:4317;
# SSL Certificates
#NginxModuleOtelSslEnabled ON
#NginxModuleOtelSslCertificatePath
#NginxModuleOtelSpanProcessor Batch
#NginxModuleOtelSampler AlwaysOn
#NginxModuleOtelMaxQueueSize 1024
#NginxModuleOtelScheduledDelayMillis 3000
#NginxModuleOtelExportTimeoutMillis 30000
#NginxModuleOtelMaxExportBatchSize 1024
NginxModuleServiceName DemoService;
NginxModuleServiceNamespace DemoServiceNamespace;
NginxModuleServiceInstanceId DemoInstanceId;
NginxModuleResolveBackends ON;
NginxModuleTraceAsError ON;
#NginxModuleWebserverContext DemoService DemoServiceNamespace DemoInstanceId
#NginxModuleSegmentType custom
#NginxModuleSegmentParameter 15,1,6,7
Sample NGINX Configuration File
user nginx;
worker_processes 1;
error_log /var/log/nginx/error.log warn;
pid /var/run/nginx.pid;
load_module /opt/opentelemetry-webserver-sdk/WebServerModule/Nginx/
ngx_http_opentelemetry_module.so;
events {
worker_connections 1024;
}
http {
include /etc/nginx/mime.types;
default_type application/octet-stream;
log_format main '$remote_addr - $remote_user [$time_local] "$request" '
'$status $body_bytes_sent "$http_referer" '
'"$http_user_agent" "$http_x_forwarded_for"';
access_log /var/log/nginx/access.log main;
sendfile on;
#tcp_nopush on;
keepalive_timeout 65;
#gzip on;
include /etc/nginx/conf.d/*.conf;
include /opt/opentelemetry_module.conf;
}