Datadog
imgproxy can send its metrics to Datadog. To use this feature, do the following:
-
Install & configure the Datadog Trace Agent (>= 5.21.1).
-
Set the
IMGPROXY_DATADOG_ENABLEenvironment variable totrue. -
Configure the Datadog tracer using
ENVvariables provided by the package:DD_AGENT_HOST: sets the address to connect to for sending metrics to the Datadog Agent. Default:localhostDD_TRACE_AGENT_PORT: sets the Datadog Agent Trace port. Default:8126DD_DOGSTATSD_PORT: set the DogStatsD port. Default:8125DD_SERVICE: sets the desired application name. Default:imgproxyDD_ENV: specifies the environment to which all traces will be submitted. Default: emptyDD_TRACE_SOURCE_HOSTNAME: specifies the hostname with which to mark outgoing traces. Default: emptyDD_TRACE_REPORT_HOSTNAME: whentrue, sets hostname toos.Hostname()with which to mark outgoing traces. Default:falseDD_TAGS: sets a key/value pair which will be set as a tag on all traces. Example:DD_TAGS=datacenter:njc,key2:value2. Default: emptyDD_TRACE_ANALYTICS_ENABLED: allows specifying whether Trace Search & Analytics should be enabled for integrations. Default:falseDD_RUNTIME_METRICS_ENABLED: enables automatic collection of runtime metrics every 10 seconds. Default:falseDD_TRACE_STARTUP_LOGS: causes various startup info to be written when the tracer starts. Default:trueDD_TRACE_DEBUG: enables detailed logs. Default:false
-
(optional) Set the
IMGPROXY_DATADOG_ENABLE_ADDITIONAL_METRICSenvironment variable totrueto collect the additional metrics.
imgproxy will send the following info to Datadog:
- Response time
- Queue time
- Image downloading time
- Image processing time
- Errors that occurred while downloading and processing image
Additional metrics
When the IMGPROXY_DATADOG_ENABLE_ADDITIONAL_METRICS environment variable is set to true, imgproxy will send the following additional metrics to Datadog:
imgproxy.requests_in_progress: the number of requests currently in progressimgproxy.images_in_progress: the number of images currently in progressimgproxy.buffer.size: a histogram of the download buffers sizes (in bytes)imgproxy.buffer.default_size: calibrated default buffer size (in bytes)imgproxy.buffer.max_size: calibrated maximum buffer size (in bytes)imgproxy.vips.memory: libvips memory usage (in bytes)imgproxy.vips.max_memory: libvips maximum memory usage (in bytes)imgproxy.vips.allocs: the number of active vips allocations