Observability integrations
Choose the signal that answers the question
Metrics are aggregated measurements, logs describe individual events, and traces follow a request across instrumented services. A dashboard can show a rise in errors without identifying the affected request; logs can show a retry; a trace can show the slow dependency. A correlation ID and trace ID are not automatically interchangeable. Trace sampling, asynchronous processing and missing instrumentation can leave gaps. Start with an independent probe and collection health, then add richer signals for a specific question.
Alert: rising request errorsMetrics: which interval and route class?Logs: which outcomes and retry attempts?Trace: which instrumented dependency was slow?Separate Open Source and Plus collection
An external NGINX Prometheus Exporter can read Open Source stub_status; configure the Plus mode and documented API endpoint for Plus instead. Plus API includes accepted, dropped, active and idle connection fields and richer response counters for configured zones. It can also modify configuration when write access is enabled, so read-only monitoring should not expose a writable API. Pin and verify the API version and exporter release together. The following example is illustrative Plus-only syntax in an isolated management location; no API version is assumed.
# NGINX Plus only, inside private management serverlocation /api/ { allow 127.0.0.1; deny all; api write=off;}Keep the collection chain private
Prometheus collects metrics from endpoints, while Grafana queries a configured data source to visualize them. Neither grants missing per-route status counts to stub_status. For a separately approved exporter installation, check version-specific flags and bind to a private management address. Distinguish scrape success from application availability. Limit label cardinality: use a bounded route template and status class, never request IDs, full URLs or user IDs as metric labels. This partial Prometheus configuration assumes a separately configured loopback exporter.
scrape_configs: - job_name: nginx-lab static_configs: - targets: ["127.0.0.1:9113"]Propagate traces deliberately
The optional Nginx OpenTelemetry module adds tracing; its availability and directives depend on the exact build and edition. The context mode propagate receives and forwards trace context while creating the module’s tracing context. Choose trust rules for external context, avoid recording secrets as attributes, and send traces only to an approved private collector. Sample according to a defined policy rather than making every request expensive. The following partial example requires a compatible loaded module and separately configured exporter; it is not runnable in the base lab.
# Optional tracing module; partial location context# Collector and sampling policy configured separately# Enable only for a reviewed lab routeotel_trace on;otel_trace_context propagate;Practice and recap
Choose a collection source for OSS and Plus. Specify a metric, log field, trace policy and missing-data alert. Use the staged manual practice and quiz. Next: Production troubleshooting and incident response.
Check Your Understanding
Solidify your learning with the interactive assessment directly below this lesson.
Concept Quiz & Questions
Observability integrations
Choose metrics, logs and traces for a question, distinguish Plus monitoring from Open Source, and plan private collection and alerting.
What does Grafana add to stub_status?
Which source is appropriate for rich Plus upstream response counters?
Which metric label is generally safer?
Why keep a monitoring API read-only?
Which signal shows instrumented cross-service request flow?