imgproxy can send request traces to an OpenTelemetry collector. To use this feature, do the following:
host:port
) with IMGPROXY_OPEN_TELEMETRY_ENDPOINT
and the collector protocol with IMGPROXY_OPEN_TELEMETRY_PROTOCOL
. Supported protocols are:
grpc
(default)https
http
.IMGPROXY_OPEN_TELEMETRY_SERVICE_NAME
environment variable to be the desired service name.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 TraceIMGPROXY_OPEN_TELEMETRY_GRPC_INSECURE
to false
to use secure connection without TLS certificates set.IMGPROXY_OPEN_TELEMETRY_ENABLE_METRICS
to true
to enable sending metrics via OpenTelemetry Metrics API.IMGPROXY_OPEN_TELEMETRY_TRACE_ID_GENERATOR
to environment variable to be the desired trace ID generator. Supported values are:
xray
: (default) Amazon X-Ray compatible trace ID generatorrandom
: random trace ID generatorimgproxy will send the following info to the collector:
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 progressbuffer_size_bytes
: a histogram of buffer sizes (in bytes)buffer_default_size_bytes
: calibrated default buffer size (in bytes)buffer_max_size_bytes
: calibrated maximum buffer size (in bytes)vips_memory_bytes
: libvips memory usagevips_max_memory_bytes
: libvips maximum memory usagevips_allocs
: the number of active vips allocationsIf 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 (you can replace line breaks with \n
). Default: blankIf 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 (you can replace line breaks with \n
). Default: blankIMGPROXY_OPEN_TELEMETRY_CLIENT_KEY
: OpenTelemetry client TLS key, PEM-encoded (you can replace line breaks with \n
). Default: blank