mirror of
https://github.com/imgproxy/imgproxy.git
synced 2024-11-24 08:12:38 +02:00
2.7 KiB
2.7 KiB
OpenTelemetry
imgproxy can send request traces to an OpenTelemetry collector. To use this feature, do the following:
- Install & configure the OpenTelemetry collector.
- Specify the collector endpoint (
host:port
) withIMGPROXY_OPEN_TELEMETRY_ENDPOINT
and the collector protocol withIMGPROXY_OPEN_TELEMETRY_PROTOCOL
. Supported protocols are:grpc
(default)https
http
.
- (optional) Set the
IMGPROXY_OPEN_TELEMETRY_SERVICE_NAME
environment variable to be the desired service name. - (optional) Set the
IMGPROXY_OPEN_TELEMETRY_PROPAGATORS
environment variable to be the desired list of text map propagators. Supported propagators are:tracecontext
: W3C Trace Contextbaggage
: W3C Baggageb3
: B3 Singleb3multi
: B3 Multijaeger
: Jaegerxray
: AWS X-Rayottrace
: OT Trace
- (optional) Set up TLS certificates.
- (optional) Set
IMGPROXY_OPEN_TELEMETRY_ENABLE_METRICS
totrue
to enable sending metrics via OpenTelemetry Metrics API.
imgproxy will send the following info to the collector:
- Response time
- Queue time
- Image downloading time
- Image processing time
- Errors that occurred while downloading and processing an image
If IMGPROXY_OPEN_TELEMETRY_ENABLE_METRICS
is set to true
, imgproxy will also send the following metrics to the collector:
requests_in_progress
: the number of requests currently in progressimages_in_progress
: the number of images currently in progressvips_memory_bytes
: libvips memory usagevips_max_memory_bytes
: libvips maximum memory usagevips_allocs
: the number of active vips allocations
TLS Configuration
If your OpenTelemetry collector is secured with TLS, you may need to specify the collector's certificate on the imgproxy side:
IMGPROXY_OPEN_TELEMETRY_SERVER_CERT
: OpenTelemetry collector TLS certificate, PEM-encoded. Default: blank
If your collector uses mTLS for mutual authentication, you'll also need to specify the client's certificate/key pair:
IMGPROXY_OPEN_TELEMETRY_CLIENT_CERT
: OpenTelemetry client TLS certificate, PEM-encoded. Default: blankIMGPROXY_OPEN_TELEMETRY_CLIENT_KEY
: OpenTelemetry client TLS key, PEM-encoded. Default: blank