Observation
Observation
This section covers monitoring, logging, tracing, and health checks.
- Health Check
Health Check
The health check will answer with status
200 OKon every port with the configuredhealth_pathsetting or theCOUPER_HEALTH_PATHenvironment variable.As soon as the gateway instance receives a
SIGINTorSIGTERMthe check will return a status500 Internal Server Error.A shutdown delay (environment variable
COUPER_TIMING_SHUTDOWN_DELAY) allows the server to finish all running requests and gives a load balancer time to pick another gateway instance. After this delay the server goes into shutdown mode and no new requests will be accepted. - Metrics
Metrics
Our metrics feature is beta for now. However, we want to provide some core metrics which can be directly collected from Couper.
Prometheus
Couper provides a built-in Prometheus exporter. It is configurable with settings like port or
service_namelabel. If enabled the default scrape target port is9090.Grafana Dashboard
Couper provides a maintained Grafana dashboard which you can find here: grafana.json and import this JSON model to your grafana instance. You may have to set your Datasource to your Prometheus one.
- Logging
Logging
Introduction
Upon the execution of Couper all log events are sent to the standard output. You can adjust the appearance and verbosity of the logs with a variety of Settings. There are different Log Types and Fields containing useful information.
We aspire to make Couper as stable as possible so these logs are still subject to change.
Log Types
Type Description couper_accessProvides information about the frontend side of things. Compare Access Fields. couper_access_tlsProvides information about connections via configured https_dev_proxy. Compare Access Fields. couper_backendProvides information about the backend side of things. Compare Backend Fields. couper_daemonProvides background information about the execution of Couper. Each printed log of this type contains a messageentry describing the current actions of Couper. Compare Daemon Fields.couper_jobProvides information about jobs. See Job Fields. Fields
Given the large amount of information contained in some logs, it might come handy to change the format or log level (see Settings).
- Tracing
Tracing
Our tracing feature is beta for now. Couper supports distributed tracing using OpenTelemetry and the W3C Trace Context standard.
Configuration
Enable tracing with
beta_traces = truein the settings block or the-beta-tracesCLI flag. Couper exports trace spans via gRPC to an OpenTelemetry collector atbeta_traces_endpoint(defaultlocalhost:4317).The
beta_service_namesetting is used as the service name in exported spans.Trace Propagation
Couper supports W3C Trace Context propagation via the
traceparentHTTP header. Two settings control how incoming trace context is handled: