varnish-otel is now compatible with Varnish Cache >= 9.0.1. Note that tracing will still require vmod-otel, which is a Varnish Enterprise feature, but tracing and logging will work without extra configuration on the Varnish side.
Two new resource attributes are now automatically populated:
varnish.version: detected using varnishd -V at startup.service.instance.id: seethe new OTEL_VARNISH_INSTANCE_ID variable below.New environment variables:
OTEL_VARNISH_INSTANCE_ID controls how service.instance.id is set:
none: doesn’t set the attribute.uuid: generate a UUIDv4.hostname: reads the hostname.auto (default): , use the hostname if not empty, otherwise, generate a UUIDv4.OTEL_VARNISH_LOG_RECORD_FILTER allows to pass -x/-X/-i/-I arguments to varnishlog-json. This notably permits filtering sensitive headrs that shouldn’t be logged.Other changes:
c) or gauge (g) flag are exported; bitfield metrics are now ignored.Warn level instead of Debug.uint64, preventing overflows on large counters.This version focuses on finer logging, introducing new environment variables that will impact the internal use of varnishlog-json and varnishncsa.
New variables:
OTEL_VARNISH_LOG_RATE_LIMIT passes a -R argument to varnishlog-json/varnishncsa to rate-limit the logs read by varnish-otel.OTEL_VARNISH_LOG_TOOL can be set to ncsa to use varnishncsa instead of varnishlog-json. This will result in fewer attributes available for each logs, but the TraceID and SpanID will be preserved if present.OTEL_VARNISH_NCSA_FORMAT_STRING passes a -f argument to varnishncsa to specify the log format to use.OTEL_VARNISH_DURATION_BUCKETS and OTEL_VARNISH_SIZE_BUCKETS define bucke sizes for histograms.OTEL_VARNISH_LOG_QUERY allows to filter out logs before they are processed by varnish-otel.varnishstat output.RLCOL.(<collection>).accounts are now renamed varnish.rlcol.accounts{collection.name=<collection>}.OTEL_VARNISH_PPROF_LISTEN will enable go’s pprof for debugging.New histograms:
varnish.backend.duration.connectionvarnish.backend.duration.totalvarnish.backend.duration.ttfbvarnish.backend.request.bytesvarnish.backend.response.bytesvarnish.client.duration.totalvarnish.client.duration.ttfbvarnish.client.duration.waitlistvarnish.client.request.bytesvarnish.client.response.bytesreq.urlVCL can opt out of tracing using std.log("otel-tracing: false") to disable tracing for a specific transaction all its dependents.OTEL_TRACES_OPT_IN_ATTRIBUTES now accepts true and false for consistency with the other variable. on/off are still valid but will be deprecated at a later date.Multiple counter translations have been added or changed:
| Counter name | new Otel name |
|---|---|
MSE4_MEM.g_objects_ephemeral |
varnish.mse4.objects_ephemeral |
BROTLI.c_br_bytes_in |
varnish.brotli.byte.in |
BROTLI.c_br_bytes_out |
varnish.brotli.byte.out |
BROTLI.c_br_fail |
varnish.brotli.fail |
BROTLI.c_br |
varnish.brotli.compressions |
BROTLI.c_testunbr_fail |
varnish.brotli.test.decompression.fail |
BROTLI.c_testunbr |
varnish.brotli.test.decompression |
BROTLI.c_unbr_bytes_in |
varnish.brotli.decompression.byte.in |
BROTLI.c_unbr_bytes_out |
varnish.brotli.decompression.byte.out |
BROTLI.c_unbr_fail |
varnish.brotli.decompression.fail |
BROTLI.c_unbr |
varnish.brotli.decompressions |
MAIN.bans_added |
varnish.main.ban.added |
MAIN.bans_completed |
varnish.main.ban.completed |
MAIN.bans_deleted |
varnish.main.ban.deleted |
MAIN.bans_dups |
varnish.main.ban.dups |
MAIN.bans_lurker_contention |
varnish.main.ban.lurker.contention |
MAIN.bans_lurker_obj_killed_cutoff |
varnish.main.ban.lurker.obj.killed.cutoff |
MAIN.bans_lurker_obj_killed |
varnish.main.ban.lurker.obj.killed |
MAIN.bans_lurker_tested |
varnish.main.ban.lurker.tested |
MAIN.bans_lurker_tests_tested |
varnish.main.ban.lurker.test.tested |
MAIN.bans_obj_killed |
varnish.main.ban.obj.killed |
MAIN.bans_obj |
varnish.main.ban.obj |
MAIN.bans_req |
varnish.main.ban.req |
MAIN.bans_tested |
varnish.main.ban.tested |
MAIN.bans_tests_tested |
varnish.main.ban.test.tested |
MAIN.c_ykey_purges_slicer |
varnish.main.ykey.purges_slicer |
MAIN.goto_dns_lookup_fails |
varnish.main.goto.dns.lookup.failed |
MAIN.http1_iovs_flush |
varnish.main.http1.iov.flush |
MAIN.task_track_failed |
varnish.main.task_track.failed |
MAIN.task_track_slots |
varnish.main.task_track.slots |
MAIN.vcl_fail |
varnish.main.vcl.failed |
MSE.mse.c_bytes |
varnish.mse3.byte.allocated |
MSE.mse.c_freed |
varnish.mse3.byte.freed |
MSE.mse.c_ykey_purged_slicer |
MSE.mse.c_ykey_purged_slicer |
MSE.mse.c_ykey_purged |
MSE.mse.c_ykey_purged |
MSE.mse.g_alloc |
varnish.mse3.allocator.outstanding |
MSE.mse.g_bytes |
varnish.mse3.byte.used |
MSE.mse.g_space |
varnish.mse3.byte.unused |
MSE4_BANJRN.<book_name>.g_bans |
varnish.mse4.ban.persisted |
MSE4_BANJRN.<book_name>.g_bytes |
varnish.mse4.byte.used |
MSE4_BANJRN.<book_name>.g_space |
varnish.mse4.byte.unused |
MSE4_BOOK.<book_name>.c_objects_liberated |
varnish.mse4.book.liberated |
MSE4_BOOK.<book_name>.c_slot_liberation_failure |
varnish.mse4.book.liberation_failed |
MSE4_BOOK.<book_name>.c_ykey_purged_slicer |
varnish.mse4.book.ykey.slicer_purged |
MSE4_BOOK.<book_name>.c_ykey_purged |
varnish.mse4.book.ykey.purged |
MSE4_BOOK.<book_name>.c_ykey_stats_slicer |
varnish.mse4.book.ykey.stats_slicer |
MSE4_BOOK.<book_name>.c_ykey_stats |
varnish.mse4.book.ykey.stats |
MSE4_BOOK.<book_name>.g_slots_unused |
varnish.mse4.book.slot.unused |
MSE4_BOOK.<book_name>.g_slots_used |
varnish.mse4.book.slot.used |
MSE4_BOOK.<book_name>.g_ykey_bytes |
varnish.mse4.book.ykey.bytes |
MSE4_BOOK.<book_name>.g_ykey_keys |
varnish.mse4.book.ykey.keys |
MSE4_BOOK.<book_name>.g_ykey_nodes |
varnish.mse4.book.ykey.nodes |
MSE4_MEM.g_bytes_buffer |
varnish.mse4.byte.buffer |
MSE4_MEM.g_bytes_ephemeral |
varnish.mse4.byte.ephemeral |
MSE4_MEM.g_bytes_pass |
varnish.mse4.byte.pass |
MSE4_MEM.g_bytes_persisted |
varnish.mse4.byte.persisted |
MSE4_MEM.g_bytes_reqbody |
varnish.mse4.byte.reqbody |
MSE4_MEM.g_bytes_synthetic |
varnish.mse4.byte.synthetic |
MSE4_MEM.g_bytes |
varnish.mse4.byte.used |
MSE4_MEM.g_objects_ephemeral |
varnish.mse4.object.ephemeral |
MSE4_MEM.g_objects_pass |
varnish.mse4.object.pass |
MSE4_MEM.g_objects_persisted |
varnish.mse4.object.persisted |
MSE4_MEM.g_objects_reqbody |
varnish.mse4.object.reqbody |
MSE4_MEM.g_objects_synthetic |
varnish.mse4.object.synthetic |
MSE4_MEM.g_objects |
varnish.mse4.object.used |
MSE4_MEM.g_space |
varnish.mse4.byte.unused |
MSE4_STORE.<book_name>.<store_name>.c_segment_prune_fail |
varnish.mse4.store.prune_failed |
MSE4_STORE.<book_name>.<store_name>.c_segment_prune |
varnish.mse4.store.prunes |
MSE4_STORE.<book_name>.<store_name>.c_segment_pruned_objects |
varnish.mse4.store.pruned_objects |
MSE4_STORE.<book_name>.<store_name>.c_segment_remap_fail |
varnish.mse4.store.remap_failed |
MSE4_STORE.<book_name>.<store_name>.c_segment_remap |
varnish.mse4.store.remaps |
MSE4_STORE.<book_name>.<store_name>.g_bytes_unused |
varnish.mse4.store.byte.unused |
MSE4_STORE.<book_name>.<store_name>.g_bytes_used |
varnish.mse4.store.byte.used |
MSE_BOOK.<book_name>.g_banlist_bytes |
varnish.mse3.book.banlist.byte.used |
MSE_BOOK.<book_name>.g_banlist_space |
varnish.mse3.book.banlist.byte.unused |
MSE_BOOK.<book_name>.g_bytes |
varnish.mse3.book.byte.used |
MSE_BOOK.<book_name>.g_space |
varnish.mse3.book.byte.unused |
MSE_STORE.<store_name>.c_aio_finished_bytes_write |
varnish.mse3.store.aio.finished.byte.writes |
MSE_STORE.<store_name>.g_alloc_<extent_size>_bytes |
varnish.mse3.store.byte.used |
MSE_STORE.<store_name>.g_alloc_<extent_size>_extents |
varnish.mse3.store.extent.used |
MSE_STORE.<store_name>.g_alloc_bytes |
varnish.mse3.store.byte.all.used |
MSE_STORE.<store_name>.g_alloc_extents |
varnish.mse3.store.extent.all.used |
MSE_STORE.<store_name>.g_free_<extent_size>_bytes |
varnish.mse3.store.byte.unused |
MSE_STORE.<store_name>.g_free_<extent_size>_extents |
varnish.mse3.store.extent.unused |
MSE_STORE.<store_name>.g_free_bytes |
varnish.mse3.store.byte.all.unused |
MSE_STORE.<store_name>.g_free_extents |
varnish.mse3.store.extent.all.unused |