Search

Introduction

VarnishVision is intended to provide comprehensive observability for Varnish Cache environments. By leveraging OpenTelemetry, varnishlog (shared memory log), and varnishstat (statistics), VarnishVision will offer detailed insights into caching behavior, traffic flows, and system performance.

Environment Variables for the OpenTelemetry Exporter

These variables configure the different exporters for traces, metrics, and logs in Varnish.

Variable Description Possible Values Default
OTEL_TRACES_EXPORTER Defines the exporter used for traces stdout, http, grpc, none stdout
OTEL_METRICS_EXPORTER Defines the exporter used for metrics stdout, http, grpc, none stdout
OTEL_LOGS_EXPORTER Defines the exporter used for logs stdout, http, grpc, none stdout
OTEL_RESOURCE_ATTRIBUTES Allows specifying resource attributes String -
OTEL_SERVICE_NAME Name of the service used in instrumentation String varnish
OTEL_PROPAGATORS Defines the propagators used for context propagation between services. tracecontext, baggage, none none
OTEL_TRACES_SAMPLER Defines the sampler for traces always_on, always_off always_on
OTEL_TRACES_SAMPLER Defines which logging tool to use for Varnish logs ncsa, json json
OTEL_VARNISH_NCSA_FORMAT_STRING Specifies a custom format string for varnishncsa String -
OTEL_VARNISH_NCSA_FORMAT_FILE Specifies a custom format file for varnishncsa File path -
OTEL_VARNISH_LOG_PROBE Enables or disables log processing for backend probes true, false false
OTEL_VARNISH_LOG_TOOL Defines which logging tool to use for Varnish logs ncsa, json json
OTEL_VARNISH_NCSA_FORMAT_STRING Specifies a custom format string for varnishncsa String -
OTEL_VARNISH_NCSA_FORMAT_FILE Specifies a custom format file for varnishncsa File path -
OTEL_VARNISH_LOG_PROBE Enables or disables log processing for backend probes true, false false
OTEL_VARNISH_WORKDIR varnishd’s -n argument String -
OTEL_VARNISH_METRICS_FILTER Specifies filters to include or exclude certain metrics from export, via a comma separated list of globs passed to varnishncsa via -f String -
OTEL_METRIC_EXPORT_INTERVAL The time interval (in milliseconds) between the start of two export attempts. Integer 60000
OTEL_METRIC_EXPORT_TIMEOUT Maximum allowed time (in milliseconds) to export data. Integer 30000

Prerequisites

Install Varnish

Before anything else, make sure Varnish is already up and running. You can refer to our installation tutorials for detailed instructions.

You can also use the automated installation method for a quicker approach.

Install the Opentelemetry Exporter

Install the varnish-otlp-exporter package:

apt install -y ./varnish-otlp-exporter_0.0.1-1~focal_amd64.deb

®Varnish Software, Wallingatan 12, 111 60 Stockholm, Organization nr. 556805-6203